postgresql

Charmed PostgreSQL VM

Channel Revision Published Runs on
latest/stable 345 09 Nov 2023
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 553 28 Jan 2025
Ubuntu 22.04
14/candidate 552 28 Jan 2025
Ubuntu 22.04
14/beta 553 28 Jan 2025
Ubuntu 22.04
14/beta 552 28 Jan 2025
Ubuntu 22.04
14/edge 567 Today
Ubuntu 22.04
14/edge 566 Today
Ubuntu 22.04
16/edge 527 27 Nov 2024
Ubuntu 24.04
16/edge 526 27 Nov 2024
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

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 deployments

These guides cover some specific deployment scenarios and architectures.

External TLS access

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:

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.