Skip to content

PostgreSQL: deployment options

The PostgreSQL template deploys a database managed by the CloudNativePG (CNPG) operator on the cluster.

These settings are chosen in the New app form, before deploying:

  • Number of instances: 1 by default (no high availability). From 2 onward, CNPG automatically fails over to a replica if the primary goes down. Editable at any time from Configure, even after deployment: CNPG adds or removes replicas accordingly.
  • PostGIS (geospatial data): a single checkbox. The PostgreSQL image that ships the extension is picked automatically (cluster setting POSTGIS_DEFAULT_IMAGE) and the extension is created in the database at deployment time — nothing else to fill in. A hidden PostGIS image (advanced) field lets you force another version, which must then match the CNPG operator's PostgreSQL major version.
  • Prometheus metrics: enabled by default, exposes CNPG's metrics to the platform's Prometheus.
  • Connection pooling (PgBouncer): disabled by default; useful for workloads with many short-lived connections. Once enabled, apps that want to use it connect to the <app-name>-postgres-pooler service instead of the usual -rw service.

Warning

Like the database name or the admin user, PostGIS only takes effect when the application is created (CNPG bootstrap): enabling it on an already-deployed application has no effect.

See also

  • PostgreSQL administration — databases, users and rights, running SQL, external access from a workstation or a third-party tool.
  • Backup and restore — continuous WAL archiving to S3, restore into a new application, point-in-time restore.