app, owned by the user app. Create it on the Storage page and connect it to your project as described in Storage. Your Ktor servers then get its connection details as env vars.
Sizes
You pick the disk. CPU and memory follow from it and aren’t billed.
On the free plan, a Postgres store has 1 GB disk.
Env vars
A connected project gets these runtime env vars, with the connection’s prefix in front if it has one:JDBC_DATABASE_URL has no user or password in it. Pass PGUSER and PGPASSWORD to your driver or pool. Both URLs ask for an encrypted connection (sslmode=require). The host stays the same for the store’s whole life, also after a restore.
Only the apps of connected projects can reach the store. You can’t connect to it from your own machine, and the panel has no SQL console. For local development, run Postgres on your machine and fall back to it when the env vars are missing.
Connect from Ktor
This example uses the Postgres JDBC driver (org.postgresql:postgresql) and HikariCP (com.zaxxer:HikariCP) in your server module:
Database.connect(dataSource()). Clients that take a postgresql:// URL with the user and password in it can use DATABASE_URL instead.
If you connected the store with a prefix, read the prefixed names, for example ANALYTICS_JDBC_DATABASE_URL.
Backups
The platform backs up every Postgres store on its own:- Changes are archived continuously. New changes reach the backups within about 5 minutes.
- A base backup is taken every day. The first one is taken shortly after the store is ready.
- Backups are kept 7 days.
Restore to a point in time
A restore takes the store back to how it was at a moment you pick, any minute within the window.1
Open the backups
Open the store’s Backups tab and click Restore to a point in time.
2
Pick the moment
Pick the Day and enter the Time as
HH:MM, in your local time. Click Continue.3
Confirm
Check the moment and click Restore.
- Restoring needs the Admin role, and the store must be Ready.
- While a store restores, it can’t be resized.
- If a restore fails, or doesn’t finish within 12 hours, the store keeps its data from before the restore. The Overview tab says what went wrong.
On a self-hosted server without backup storage, the Backups tab says that backups are off. See Storage.
Resize
Open the store’s Settings tab and click Resize. See Resize a store for the steps.- The disk grows while the database keeps running.
- When the new size also moves the store up a CPU and memory step (past 5 GB or past 25 GB), Postgres restarts once. Open connections drop briefly and your apps have to reconnect.
- The store can’t shrink again.