Skip to content

Postgres is in Alpha. It is a branchable Postgres 19 database for development and preview work, not production; each branch is a VM of its own that costs like one and sleeps when nobody uses it.

Create makes the database and its main branch. size is the base memory of every branch, from 512 to 16384 MiB in steps of 512, and 512 when omitted. The create answer carries the password and URL once, so save them then. A plan that does not allow public ports cannot create a database.

  1. Open Databases.
  2. Select Create database.
  3. Enter app in Name.
  4. Enter 512 in Size (MiB).
  5. Select Create database. The app is ready dialog shows the connection; copy it before you select Done.

A database belongs to the project in its project field, default when omitted. Its name is unique in that project; a duplicate answers 409 name_taken.

The create answer carries the password and URL once. The password is also stored as the project secret db:app:main, and a branch gets db:app:preview with the password it copied. The API’s get and list never return the password or the URL. The secrets API refuses to change or delete a db: secret; it goes with the database.

Field What it is
url postgresql://user:<password>@db-app.default.internal:5432/postgres, with the password percent-encoded
internal db-app.default.internal:5432, the private name inside the project
forward si port forward 6f1c0f0e8a 5432, the command that opens a local TCP port
wss wss://6543-6f1c0f0e8a.slashinfra.dev/v1?address=127.0.0.1:5432, the public wsproxy endpoint
user user, the one Postgres role in every branch
password 32 random bytes, base64url, answered once

Scroll horizontally to see all columns.

Port 6543 is the wsproxy. It relays to Postgres on 127.0.0.1:5432 inside the VM. The endpoint is public because Postgres authenticates with SCRAM. A WebSocket driver such as @neondatabase/serverless uses it; psql speaks TCP, so it uses a forward or the private name.

From a VM of the same project, connect to db-app.default.internal:5432 with the same role and password. No key and no open port are needed.

From your laptop, open a forward and leave it running:

Terminal window
si port forward 6f1c0f0e8a 5432
Output
127.0.0.1:5432 -> SVM 6f1c0f0e8a:5432
Ctrl-C closes every forward

In a second terminal, connect with your password:

Terminal window
psql 'postgresql://user:YOUR_PASSWORD@127.0.0.1:5432/postgres' -c 'select 1'
Output
?column?
----------
1
(1 row)

List returns every database of one project, newest first, with its branches, its connection without the password and its RPO. A project with none gets [].

  1. Open Databases. The table lists Name, Branches, Private name and Recovery point.

Get returns one database by name, with its branches and its connection without the password. An unknown name answers 404 database_not_found.

  1. Open Databases.
  2. Select app in the table. Its Connection, Branches and Backups sections are on the same page.

A branch forks the disk of main or another branch and gets its own VM, CPU, memory and storage meter. Every branch uses the database size: each 512 MiB step gives 0.25 CPU, so a 512 MiB branch has 0.25 CPU and a 0.5 CPU ceiling. A branch counts as a VM against the plan’s 5 or 50 VMs. CPU and memory count while it runs, and storage counts while it sleeps. Its sleep mode is auto: a branch nobody uses sleeps like a VM, its open connections end, and the next connection wakes it.

The branch copies the parent’s password into db:app:preview, so its URL works with the same password until you rotate it. The create answer carries that URL and password once. To start from a backup instead of a branch, send snapshot with the backup’s id or name; it wins over from. The snapshot must be a backup of this database, or the request answers 404 snapshot_not_found, or 409 not_a_backup for another kind.

  1. Open Databases and select app.
  2. In Branches, select Create branch.
  3. Enter preview in Branch name.
  4. Choose main in From.
  5. Select Create branch. The preview is ready dialog shows its connection; copy it before you select Done.

Rotate generates a new 32-byte password, changes the Postgres role with ALTER ROLE, and replaces the secret db:app:preview. The answer carries the new URL and password once. An old connection stops working at the next authentication. si org db password app rotates main when you omit the branch.

  1. Open Databases and select app.
  2. In Branches, select Reset password on the preview row.
  3. Select Reset password in the dialog. The New password for preview dialog shows the new connection; copy it before you select Done.

Schedule creates the one snapshot schedule of the main branch. Every fire runs CHECKPOINT, captures the disk as a backup snapshot named backup-YYYYMMDDTHHMMSSZ, and keeps the newest keep. The cron runs in UTC. A second schedule answers 409 name_taken.

The RPO of a restore is the last checkpoint, at most 60 seconds or 512 MiB of writes behind. There is no point-in-time recovery and no WAL archive. A backup is a disk snapshot, and a schedule that has not fired yet lists no backups.

  1. Open Databases and select app.
  2. In Backups, select Schedule backups.
  3. Enter 0 3 * * * in Cron.
  4. Enter 7 in Keep.
  5. Select Schedule backups. The dashboard says Backup scheduled; the first snapshot appears after the first fire.

List returns every backup snapshot of every branch, newest first, with its state and sizes. A backup’s name is backup-YYYYMMDDTHHMMSSZ in UTC. state is creating while the capture runs, then ready or failed. stored_bytes is the compressed size of the capture, and the dashboard’s Size is that value. A database with no backup gets [].

  1. Open Databases and select app. The Backups section lists Name, Created, Size and State; before the first fire it says No backups yet.

Delete removes the branch VM and its db:app:preview secret. main is the database itself: it answers 409 main_branch, and DELETE /databases/app deletes the database. The database, main and the other branches stay. The CLI has no command to delete a branch; use the dashboard or the API.

  1. Open Databases and select app.
  2. In Branches, select Delete branch on the preview row.
  3. Select Delete branch in the dialog. The dashboard says Branch preview deleted.

Delete removes every branch VM, every backup snapshot and every db:app:* secret, and writes a database.delete audit row. It cannot be undone. The answer is 204 when the VMs are deleting, not when they are gone.

  1. Open Databases and select app.
  2. Select Delete database.
  3. Select Delete database in the dialog. The dashboard returns to the list.
Field Type Default Allowed values What it changes
name (create) string Required db-<name> has 1 to 32 lowercase letters, digits and hyphens, starting with a letter; unique in the project The database name and its main VM name, db-<name>.
project (--project) string default A project name, or its proj_ id The project that holds the database. A body field on create, a query parameter on every other operation.
size (--size) integer 512 512 to 16384, in steps of 512 The base memory of every branch, and its CPU: each 512 MiB gives 0.25 CPU. The size cannot change.
name (branch create) string Required db-<database>-<branch> has 1 to 32 lowercase letters, digits and hyphens, starting with a letter; unique in the database; not main The branch name and its VM name.
from (--from) string main A branch of this database The branch to fork. Ignored when snapshot is set.
snapshot (--snapshot) string None A backup snapshot of this database, by id or name The disk to start the branch from. It wins over from.
cron (--cron) string Required for a schedule Five fields: minute, hour, day, month, weekday, with the next two fires at least the plan minimum apart When the backup runs, in UTC.
keep (--keep) integer Required for a schedule 1 to 100 How many backup snapshots the schedule keeps; the oldest goes when a new one is made.
ref (path) string Required A database name, unique in the project query The database that get, delete, branch, backups and password act on.
branch (path, [BRANCH]) string Required in the path; main in the CLI main, or a branch name of the database The branch that delete and password act on.

Scroll horizontally to see all columns.

Code When Fix
invalid_name Create or branch create sends a name that breaks the rule in Options. Fit db-<name> or db-<database>-<branch> to 1 to 32 lowercase letters, digits and hyphens, starting with a letter.
invalid_size Create sends a size outside 512 to 16384, or not a step of 512. Send a whole number from 512 to 16384 in steps of 512.
size_unavailable No node offers the requested memory. Choose a smaller size.
name_taken Create, branch create or schedule uses a name that is already used. Choose another name; a database has one backup schedule.
database_create_failed The VM or its initdb failed; nothing was kept. Try again.
database_init_failed The database did not start; nothing was kept. Try again.
no_capacity No node has free capacity for the VM. Wait for Retry-After and retry.
public_ports_not_allowed The plan refuses public ports, and a database opens its wsproxy port 6543 public. Use a plan with public ports.
database_not_found Get, delete, branch, backups or password names no database of the project. Check the name and the project.
branch_not_found Branch create’s from, delete or password names no branch of the database. Check the branch name.
snapshot_not_found Branch create’s snapshot names no snapshot of the project, or one of another database. Check the snapshot name or id and the database.
not_a_backup snapshot names a snapshot that is not a backup. Choose a backup snapshot.
password_missing The branch has no stored password secret. Reset the password, or create the branch again.
database_unavailable The password change cannot reach the database; it is starting or not reachable. Try again in a moment.
main_branch Delete branch names main. Delete the database instead.
invalid_cron The cron is not five fields. Send minute, hour, day, month and weekday.
schedule_too_frequent Two fires are closer together than the plan allows. Use a longer interval.
invalid_keep keep is outside 1 to 100. Send a whole number from 1 to 100.
project_not_found The project query or create body names no project of the organization, or one outside the key’s scope. Check the name or id, and the key’s project scope.

Scroll horizontally to see all columns.

Errors that any request can return are in the error catalog.

Operation Who can Key action
Create a database Any member database:write
List databases Any member database:read
Get a database Any member database:read
Create a branch Any member database:write
Rotate a branch password Any member database:write
Schedule backups Any member database:write
List backups Any member database:read
Delete a branch Any member database:delete
Delete a database Any member database:delete

Scroll horizontally to see all columns.

  • A database name must make db-<name> a valid VM name: 1 to 32 lowercase letters, digits and hyphens, starting with a letter. A branch name must make db-<database>-<branch> fit the same rule, so a long database name leaves fewer characters for the branch.
  • The size is 512 to 16384 MiB in steps of 512, and 512 is the default. Every branch uses the database size, and the size cannot change after create.
  • Each branch has a 50 GiB sparse disk, like a VM; empty space does not count as stored data, and a full disk answers 507.
  • Each 512 MiB step gives 0.25 CPU of base CPU. A 512 MiB branch has 0.25 CPU and a 0.5 CPU ceiling; a 16384 MiB branch has 8 CPU and a 16 CPU ceiling.
  • A branch counts as a VM against the plan: Standard allows 5 VMs and Pro 50, branches included. A create beyond the limit fails and keeps nothing.
  • A database has one backup schedule. keep is 1 to 100 backup snapshots, and they do not count against the plan’s 50 or 200 snapshot limit.
  • The RPO is the last checkpoint, at most 60 seconds or 512 MiB of writes behind. There is no point-in-time recovery and no WAL archive.
  • A backup is a disk snapshot of one branch. The database cannot serve logical replication, because its wal_level is minimal.
  • The Postgres image has no SSH server, no desktop, no outbound network and a minimal shell.
  • A plan without public ports cannot create a database.

The full list is in Limits.