Skip to content

Dedicated databases

Every project starts on a shared, managed Postgres database. Plans that include a dedicated database give your organization a database server of its own, with its own backups and point-in-time restore. Open Infrastructure in a project to see which database it uses now.

PlanDedicated PostgreSQL
Free—
Starter—
ProMicro (dev-grade, not covered by the uptime target)
AgencySmall (dev-grade, not covered by the uptime target)
Studio+Medium (production-grade)
EnterpriseLarge (production-grade)

The included database is set up for your organization automatically, when you create a project on a plan that includes one or when you move to such a plan. It takes about 10 minutes. Your organization’s projects then move onto it: each project’s tables are copied, checked, and switched over. The Infrastructure page shows the included database, which projects use it, and Retry if its setup failed.

A plan with no dedicated database keeps every project on the shared database.

Under Need dedicated cores? on the Infrastructure page, a project can get a larger database with dedicated cores, as a paid add-on:

PlanProduction-grade PostgreSQL add-on
ProMedium (paid)
AgencyMedium+ (paid)
Studio+Medium+ (paid)
EnterpriseMedium+ (paid)

The confirm dialog shows the monthly price and today’s prorated charge before anything is added. The charge starts the day you add the database. The current sizes and prices are on the Infrastructure page, and GET /database/tiers returns them. Database storage beyond a size’s included storage is billed per GB-month.

When the new database is ready, VAIF copies the project’s data to it, checks the copy, and then switches the project over.

Adding, resizing, stopping, starting and deleting a database needs the admin role on the project. Everyone else sees the databases and why they cannot change them.

The database card on the Infrastructure page has these actions:

  • Resize database. The new size is billed from today, prorated.
  • Stop. Projects that use the database cannot read or write data until you start it again. No data is lost. Stopping does not stop billing: the monthly charge continues until you delete the database.
  • Delete database. Type the confirmation shown. Its monthly charge stops, and its projects go back to the shared database. A database that has read replicas cannot be deleted until its replicas are.
PlanAutomated Backups
FreeNone scheduled
StarterNone scheduled
ProDaily 04:00 UTC, 7 kept
AgencyDaily 04:00 UTC, 7 kept
Studio+Daily 04:00 UTC, 7 kept
EnterpriseDaily 04:00 UTC, 7 kept

Backups are the same on every plan that has a dedicated database. The shared database has no scheduled backups.

PlanPoint-in-Time Recovery
FreeNone configured
StarterNone configured
Pro7 days
Agency7 days
Studio+7 days
Enterprise7 days

On the Infrastructure page, Restore to a point in time creates a copy of the database as it was at the moment you choose, as a new database. Your current database is not changed, and your project keeps using it while the copy is set up, which takes from minutes to a few hours.

  • The dialog shows what the copy costs before you confirm. The copy is billed until you delete it.
  • When the copy is ready, Switch project to this copy points the project at it. Switch back to the original points it back.
  • The other database keeps running until you delete it from the Infrastructure page.

Restores, and switching between the original and a copy, are for organization owners and admins. Projects on the shared database have no point-in-time restore.

High Availability (regional standby) is included on Studio+ and Enterprise: the plan’s included database runs with a standby in a second zone of the same region, and fails over to it automatically. Databases on other plans, and databases you add, are single-zone.

A read replica is a read-only copy of a dedicated database, kept in sync automatically, for reports and other read-heavy work. It is created in the same region as the database it copies.

PlanRead replicas per database
Studio+1
Enterprise3
  • Which databases. A replica needs a Large or bigger database. On a smaller one, add a Large database first.
  • Price. A replica costs the monthly price of its database’s size, billed to your subscription as its own line, and its storage is billed like the database’s. The Create read replica dialog shows the monthly price, today’s prorated charge and the storage rate before anything is added. On yearly billing it is billed yearly, and the prorated amount for the rest of the billing year is charged right away.
  • Size. A replica is the size of the database it copies. It cannot be resized, stopped or started on its own.
  • Status and lag. Each replica shows whether it is still being set up or active and, once active, how many seconds it is behind its database (“Lag unavailable” when there is no measurement). Setting up copies the database’s data, can take hours, and is billed while it runs.
  • Connecting. An active replica shows its read-only address on the Infrastructure page. Writes to it are refused.
  • Delete. Choose the delete icon on the replica and type the confirmation shown. The database it copies is not affected, and the replica’s charge stops.

Only organization owners and admins create and delete replicas.

If your organization moves to a plan that no longer includes its database, the Infrastructure page shows Your plan no longer includes this database with the date until which it stays available. Upgrade to keep it. After that date, its projects move back to the shared database. A read replica your plan no longer covers stays for a short grace period; delete it, or it is removed when the grace period ends.

With a console access token:

Route What it does
GET /projects/{projectId}/infrastructure The project’s databases, their status and the actions allowed
POST /projects/{projectId}/infrastructure/provision-preview The monthly price and today’s prorated charge for a paid database
POST /projects/{projectId}/infrastructure/provision Add a paid database
POST /projects/{projectId}/infrastructure/{instanceId}/resize Resize a database
POST /projects/{projectId}/infrastructure/{instanceId}/stop and /start Stop or start a database
DELETE /projects/{projectId}/infrastructure/{instanceId} Delete a database, with { "confirmation": "..." }
GET /projects/{projectId}/infrastructure/restores The restore window and the project’s copies
POST /projects/{projectId}/infrastructure/restores/preview and /restores Price a restore, then start it
POST /projects/{projectId}/infrastructure/{instanceId}/switch Point the project at a copy, or back at its original
GET /projects/{projectId}/infrastructure/{instanceId}/replicas A database’s replicas, their lag, and whether another may be added
POST /projects/{projectId}/infrastructure/{instanceId}/replica-preview and /replica Price a replica, then create it