Databases
PostgresBeta
Managed Postgres 17 with TLS, continuous backups and point-in-time restore.
A Postgres 17 database with the pgvector extension, run for you as a single instance in the region you choose. It is in beta: read the limits before you put production data in it.
Create a database
- In the dashboard, create a Postgres database in a project. Choose its name, region and storage, from 1 to 20 GB.
- Choose the master username, or keep
postgres. It can’t be changed later. - Set a password of 12 to 128 characters, or leave it empty and Dcubix generates one. A generated password is shown once, with its connection string. Save it then.
- The database is ready in about 20 seconds.
The master username uses lowercase letters, numbers and underscores, starts with a letter and is at most 63 characters. It can’t start with pg_ or be a Postgres reserved word. The master role is a superuser: create other roles for your apps as you would on any Postgres.
Postgres isn’t available in Jakarta, Kuala Lumpur, Lagos, Manila or Bangkok. See Regions.
Connect
Every database has its own hostname, such as orders-k3x9qz.<postgres domain>, on port 5432.
Always connect with the hostname, never the IP address. The certificate is issued for the hostname, and the hostname is what Dcubix keeps pointing at your database.
postgresql://postgres:PASSWORD@orders-k3x9qz.<postgres domain>:5432/postgres?sslmode=requireKeep the connection string in an environment variable, such as DATABASE_URL, rather than in code.
TLS
Only TLS connections with a password are accepted. A client that doesn’t use TLS is refused.
The certificate is self-signed, for the database’s hostname. sslmode=require encrypts the connection but doesn’t check who answered. To check, save the database’s certificate and use verify-full:
psql "postgresql://postgres@orders-k3x9qz.<postgres domain>:5432/postgres?sslmode=verify-full&sslrootcert=orders.crt"Settings
| Setting | Range | Default |
|---|---|---|
shared_buffers |
32 to 8,192 MB | 256 MB |
max_connections |
10 to 500 | 100 |
Changing either restarts the database, with 20 to 45 seconds without connections.
shared_buffers is a ceiling, not a reservation: memory is billed as Postgres fills it. Set work_mem and other per-session settings yourself in SQL, with ALTER ROLE … SET or SET. They need no restart.
Storage
Grow storage at any time; it can’t shrink. Growing restarts the database briefly, for about 10 seconds. During the beta, storage is 1 to 20 GB.
Reads and writes to the database’s disk run at up to 10 MB/s.
Passwords
Reset the master password from the dashboard, with one you choose or a generated one shown once. The database restarts to apply it.
A reset replaces the password even if you changed it in SQL since.
Backups
Backups run on their own, from the moment the database is created:
- A full backup when the database is created, and then once a day.
- Every change is archived, at least once a minute.
- Kept for 7 days. Older backups are deleted.
Backups are stored apart from the database, in Western Europe.
Restore to a point in time
A restore makes a new database from another’s backups, in the same project, region and size, with the same master username. The original keeps running.
- Open the database you want to restore from and choose to restore it.
- Give the new database a name, and choose a moment, or the latest the backups hold.
- Set a password for it, or have one generated.
- When it’s ready, point your app at the new database’s hostname.
The moment must be in the past, after the database was created, and within the last 7 days.
- To a moment in the last few minutes, the restore waits until the original has archived past it, which can take up to about 7 minutes.
- To the latest, it restores everything archived so far.
- A restore with no backup from before the moment fails, and says so.
A database can’t be restored from until it has been ready once, and a restore in progress can’t be restarted or reconfigured.
Delete a database
Deleting a database removes it and its hostname at once. Its backups are kept for 7 days and then deleted. A deleted database can’t be restored from the dashboard.
A project that has databases can’t be deleted.
Limits during the beta
- One instance, in one region. There is no failover and there are no read replicas. While the database restarts, there are no connections.
- Reachable over the internet only, with TLS and a password. There is no private network.
- 1 to 20 GB of storage.
- Disk throughput up to 10 MB/s.
- Settings, password resets and storage changes restart the database.
- A self-signed certificate.
verify-fullneeds the database’s own certificate. - No alerts.
Pricing
A database is billed for the CPU and memory it uses, the storage it has, the data it sends out, and its own IP address. Data sent out includes the backup uploads.
CPU, memory and data sent out cost the same as for Magic Apps.