Skip to content

Managed PostgreSQL

Ghaymah Managed PostgreSQL gives you a fully managed Postgres instance. You pick the version and credentials, Ghaymah handles provisioning, high availability, backups, and upgrades. You get a connection URL you can drop straight into your app.

Ghaymah PostgreSQL page
The PostgreSQL page lists your managed instances and their status.

Click Create Database, choose a name, user, password, and version:

Create PostgreSQL database form
Your database is provisioned in about 5 minutes, encrypted at rest and in transit.

You need a volume first — the database stores its data on it.

Terminal window
# 1. Create a volume for the data
curl -X POST https://api.cumin.dev/volumes \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{ "project_id": "…", "name": "pg-data", "size": 21474836480 }'
# 2. Create the database on that volume
curl -X POST https://api.cumin.dev/db/postgres \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"project_id": "…",
"name": "my-db",
"volume_id": "<volume-id>",
"postgres_version": "16",
"postgres_user": "app",
"postgres_password": "a-strong-password",
"postgres_db": "app"
}'
Field Meaning
name Friendly name for the instance
volume_id The volume that stores the data
postgres_version Postgres major version (e.g. 16)
postgres_user Username for connections
postgres_password Password for the user
postgres_db Name of the default database to create

The instance exposes a url connection string. Set it as an environment variable on your app:

Terminal window
gy config set env DATABASE_URL=postgres://app:password@<host>:5432/app
gy config sync

Or include it in the app’s env when creating via the API:

{ "name": "DATABASE_URL", "value": "postgres://app:password@<host>:5432/app" }

List your instances:

Terminal window
curl https://api.cumin.dev/db/postgres \
-H "Authorization: Bearer $TOKEN"

Stream database logs:

Terminal window
curl "https://api.cumin.dev/db/postgres/logs/<db-id>?max=100" \
-H "Authorization: Bearer $TOKEN"
Terminal window
curl -X DELETE https://api.cumin.dev/db/postgres/<db-id> \
-H "Authorization: Bearer $TOKEN"