postgresql

Charmed PostgreSQL

Channel Revision Published Runs on
latest/stable 591 10 Apr 2025
Ubuntu 22.04 Ubuntu 20.04 Ubuntu 18.04 Ubuntu 16.04 Ubuntu 14.04
latest/stable 239 09 Feb 2022
Ubuntu 22.04 Ubuntu 20.04 Ubuntu 18.04 Ubuntu 16.04 Ubuntu 14.04
latest/stable 226 01 Apr 2021
Ubuntu 22.04 Ubuntu 20.04 Ubuntu 18.04 Ubuntu 16.04 Ubuntu 14.04
14/stable 553 04 Feb 2025
Ubuntu 22.04
14/stable 552 04 Feb 2025
Ubuntu 22.04
14/candidate 593 16 Apr 2025
Ubuntu 22.04
14/candidate 592 16 Apr 2025
Ubuntu 22.04
14/beta 605 27 Apr 2025
Ubuntu 22.04
14/beta 606 27 Apr 2025
Ubuntu 22.04
14/edge 741 06 May 2025
Ubuntu 22.04
14/edge 740 06 May 2025
Ubuntu 22.04
16/candidate 610 25 Apr 2025
Ubuntu 24.04
16/candidate 609 25 Apr 2025
Ubuntu 24.04
16/beta 610 24 Apr 2025
Ubuntu 24.04
16/beta 609 24 Apr 2025
Ubuntu 24.04
16/edge 758 07 May 2025
Ubuntu 24.04
16/edge 757 07 May 2025
Ubuntu 24.04
juju deploy postgresql --channel 14/stable
Show information

Platform:

Ubuntu
24.04 22.04 20.04 18.04 16.04 14.04

How to deploy

This page aims to provide an introduction to the PostgreSQL deployment process and lists all the related guides. It contains the following sections:


General deployment instructions

The basic requirements for deploying a charm are the Juju client and a machine cloud.

First, bootstrap the cloud controller and create a model:

juju bootstrap <cloud name> <controller name>
juju add-model <model name>

Then, either continue with the juju client or use the terraform juju client to deploy the PostgreSQL charm.

To deploy with the juju client:

juju deploy postgresql -n <number_of_replicas>

See also: juju deploy command

To deploy with terraform juju, follow the guide How to deploy using Terraform.

See also: Terraform Provider for Juju documentation

If you are not sure where to start or would like a more guided walkthrough for setting up your environment, see the Charmed PostgreSQL tutorial.

Clouds

The guides below go through the steps to install different cloud services and bootstrap them to Juju:

How to deploy on multiple availability zones (AZ) demonstrates how to deploy a cluster on a cloud using different AZs for high availability.

Special deployment scenarios

These guides cover some specific deployment scenarios and configurations.

Networking

How to deploy for external TLS VIP access goes over an example deployment of PostgreSQL, PgBouncer and HAcluster that require external TLS/SSL access via Virtual IP (VIP).

See also:

How to deploy on juju spaces goes over how to configure your deployment of PostgreSQL and client application to use juju spaces to separate network traffic.

Airgapped

How to deploy in an offline or air-gapped environment goes over the special configuration steps for installing PostgreSQL in an airgapped environment via CharmHub and the Snap Store Proxy.

Cluster-cluster replication

Cluster-cluster, cross-regional, or multi-server asynchronous replication focuses on disaster recovery by distributing data across different servers.

The Cross-regional async replication guide goes through the steps to set up clusters for cluster-cluster replication, integrate with a client, and remove or recover a failed cluster.

Juju storage

Charmed PostgreSQL uses the Juju storage abstraction to utilize data volume provided by different clouds while keeping the same UI/UX for end users.

See: How to deploy on juju storage