Google Cloud SQL / PostgreSQL ΒΆ

PostgreSQL is a relational database which is a good choice for storing data that is relational in nature. In the nais platform, we use CloudSQL from the Google Cloud Platform to provide managed PostgreSQL databases.

Minimal configuration needed to provision a database for your application:

app.yaml

The default configuration sets up the instance with:

  • 10 GB of SSD storage
  • no automatic storage increase
  • no high availability

See all configuration options in the application manifest reference.

How it works ΒΆ

The first time you deploy your application with the above configuration, Nais will provision the database into your team's own project in GCP. Your team has full access to view logs, create and restore backups and other administrative database tasks.

Nais also configures your application with the necessary environment variables needed to connect to the database. See the reference for the list of environment variables.

First time provisioning of the database will take some minutes. Your application may not be able to connect to the database until the provisioning is complete.

FAQ ΒΆ

FATAL: password authentication failed for user "<user>" ΒΆ

Do I need to enable audit logging? ΒΆ

Cloud Sql Conditions messages ΒΆ

Invalid request: backup retention should be >= transaction log retention ΒΆ

Cannot disable cloudsql.logical_decoding while there are logical replication slots ΒΆ

...immutable field(s): [Field Name: settings.0.diskSize, Got: x, Wanted: xx]... ΒΆ

Not allowed to do major version upgrade from POSTGRES_x to POSTGRES_xx ΒΆ