What you get
- PostgreSQL 14 to 18 (18 by default), on CloudNativePG.
- High availability: with three nodes, a primary and two standbys with automatic failover. The endpoint follows the new primary within about 10 to 30 seconds.
- Replication durability you choose:
async,preferred(the default) orrequired, changed without a restart. - Backups: the transaction log is archived continuously and a full backup is taken weekly, kept 7 days. Restore to any moment in that window into a new database.
- Endpoints: the primary on port 5432, PgBouncer (transaction mode) on 6432, and the standbys read-only on 5433.
- TLS only, with the database's own CA, and a firewall rule limiting who can connect.
- Upgrades of minor versions and the components around PostgreSQL in your weekly maintenance window, with a switchover.
- Rescale the node size, or go from one node to three and back.
Node sizes and prices
A database is one or three nodes of one size; each node costs the same as a VM of its size and storage.
Falkenstein (fsn1-de)
| Node size | vCPU | RAM | Storage | 1 node / month | 3 nodes / month | Available |
|---|---|---|---|---|---|---|
eco-cpu-2 | 2 | 4 GB | 20 GB | $8.00 | $24.00 | Sold out |
eco-cpu-4 | 4 | 8 GB | 40 GB | $16.00 | $48.00 | Sold out |
eco-cpu-8 | 8 | 16 GB | 80 GB | $32.00 | $96.00 | Sold out |
Beauharnois, Canada (bhs1-ca)
| Node size | vCPU | RAM | Storage | 1 node / month | 3 nodes / month | Available |
|---|---|---|---|---|---|---|
eco-cpu-2 | 2 | 4 GB | 20 GB | $8.00 | $24.00 | Yes |
eco-cpu-4 | 4 | 8 GB | 40 GB | $16.00 | $48.00 | Yes |
eco-cpu-8 | 8 | 16 GB | 80 GB | $32.00 | $96.00 | Yes |
Create a database with the API
API=https://zapcloud.dev/api/v1
H="Authorization: Bearer $ZAPCLOUD_API_KEY"
curl -s -X POST "$API/projects/$PROJECT/managed-services" -H "$H" -H "Content-Type: application/json" \
-d '{"engine":"postgresql","name":"orders","region_id":"bhs1-ca","flavor_id":"eco-cpu-2","node_count":3,"version":"18","allowed_cidr":"203.0.113.10/32"}'
# poll until ready, then:
curl -s "$API/projects/$PROJECT/managed-services/<id>/credentials" -H "$H" > orders.json
jq -r .ca_certificate orders.json > orders-ca.pem
psql "$(jq -r .uri orders.json)&sslrootcert=orders-ca.pem" -c "select version()"Frequently asked questions
Which PostgreSQL versions can I run?
Major versions 14 to 18 (18 by default). Minor versions are upgraded for you in the maintenance window; a new major means restoring into a new database.
How do backups and point-in-time restore work?
Every database is backed up continuously and kept 7 days. A restore creates a new database at the moment you pick, so the source is never changed.
What happens when the primary fails?
With three nodes, a standby takes over automatically and the endpoint follows it, usually within 10 to 30 seconds. Applications should reconnect and retry.
Do I get a superuser?
You get zcadmin, which owns defaultdb and can create databases and roles, but is not a superuser.
Can I use a connection pooler?
Yes: PgBouncer in transaction mode on port 6432, with the same address, user and password.
Related
- All products, Pricing and the API documentation
- Regions: Canada (bhs1-ca) and Germany (fsn1-de)