Skip to main content
The PostgreSQL add-on runs a PostgreSQL database inside your infrastructure, managed by CloudNativePG. It’s backed up continuously to your own cloud account, and you can restore it to any point inside the retention window.

Install

In the App Store, choose PostgreSQL and fill in: The first install asks you to run a short script that creates the identity PostgreSQL writes its backups with. Until you run it and click Verify, nothing is created.

Connect a service

inframan.yaml
DATABASE_URL receives a URL of the form:
The connection requires TLS. The database is reachable only from inside the cluster.

Backups

  • Continuous: every change is archived as it’s written, through PostgreSQL’s write-ahead log.
  • Daily: a full base backup at the backup hour you chose.
  • Retention: 7 days on non-production infrastructures.
  • On demand: click Back up now on the Backups tab.
Backups are stored in your cloud account.

Restore

A restore never overwrites your database. It creates a new PostgreSQL instance on the same infrastructure, so the original stays exactly as it was until you decide what to do with it.
  1. Open the instance and select the Backups tab.
  2. Choose to restore, then pick what to Recover to: a backup, or a Point in time within the retention window.
  3. Name the new instance and create it.
  4. Point your services at the new instance by changing their connection, for example DATABASE_URL: postgres/main-restored, and deploy.

Monitoring

The instance’s Monitoring tab charts capacity, persistence, throughput, connections and resources. The Overview tab runs health checks for:
  • The database being down.
  • Connections close to the limit.
  • Transaction ID wraparound risk.
A connected AI assistant can read 16 PostgreSQL metrics by name, including connections, cache_hit_rate, database_size, deadlocks, replication_lag and longest_transaction.

Limits

  • One tier, Basic: a single PostgreSQL instance.
  • On Google Cloud the database gets its own node pool, which uses Spot nodes. When a node is reclaimed, the database restarts on a new one from its persistent volume.
  • Importing an existing database from a dump isn’t available on AWS.