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 363 21 Feb 2024
Ubuntu 22.04
14/candidate 412 28 May 2024
Ubuntu 22.04
14/candidate 413 28 May 2024
Ubuntu 22.04
14/beta 413 28 May 2024
Ubuntu 22.04
14/beta 412 28 May 2024
Ubuntu 22.04
14/edge 416 Yesterday
Ubuntu 22.04
14/edge 415 Yesterday
Ubuntu 22.04
juju deploy postgresql --channel 14/stable
Show information


22.04 20.04 18.04 16.04 14.04

Charm types “legacy” vs “modern”

There are two types of charms stored under the same charm name postgresql:

  1. Reactive charm in the channel latest/stable (called legacy)
  2. Ops-based charm in the channel 14/stable (called modern)

The legacy charm provided endpoints db and db-admin (for the interface pgsql). The modern charm provides old endpoints as well + new endpoint database (for the interface postgresql_client). Read more details about the available endpoints/interfaces.

Note: Please choose one endpoint to use. No need to relate all of them simultaneously!

The default track “latest” vs “14”

The default track has been switched from the latest to 14. It is to ensure all new deployments use a modern codebase. We strongly advise against using the latest track due to its implicit nature. In doing so, a future charm upgrade may result in a PostgreSQL version incompatible with an integrated application. Track 14 guarantees PostgreSQL 14 deployment only. The track latest will be closed after all applications migrated from Reactive to Ops-based charm.

How to migrate from “legacy” to “modern” charm

The “modern” charm provides temporary support for the legacy interfaces:

  • quick try: relate the current application with new charm using endpoint db (set the channel to 14/stable). No extra changes necessary:
    charm: postgresql
    channel: 14/stable

Warning: NO in-place upgrades possible! Reactive charm cannot be upgraded to Operator-framework-based one. To move DB data, the second/modern DB application must be launched nearby and data should be copied from “legacy” application to the “modern” one. Canonical Data Platform team is preparing copy&paste guide right now. Please contact us if you need migration instructions.

Note: the trust option must be enabled if Role Based Access Control (RBAC) is in use on your Kubernetes.

How to deploy old “legacy” postgresql charm

Deploy the charm using the channel latest/stable:

    charm: postgresql
    channel: latest/stable

Note: remove Charm store prefix cs: from the bundle. Otherwise the modern charm will be chosen by Juju (due to the default track pointing to 14/stable and not latest/stable). The common error message is: cannot deploy application "postgresql": unknown option "...".

Config options supported by modern charm

The legacy charm config options were not moved to the modern charm due to no need. The modern charm applies the best possible configuration automatically.

Feel free to contact us about the DB tuning/config options.

Extensions supported by modern charm

The legacy charm provided plugins/extensions enabling through the relation (interface pgsql). It is NOT supported by the modern charm (neither pgsql nor postgresql_client interfaces). Please enable the necessary extensions using appropriate plugin_*_enable config option of the modern charm. After enabling the modern charm, it will provide plugins support for both pgsql and postgresql_client interfaces.

Please find the list of supported PostgreSQL Extensions by modern charm.

Feel free to contact us with a list of required extensions.

Roles supported by modern charm

In the legacy charm, the user could request roles by setting the roles field to a comma separated list of desired roles. It is NOT supported by the modern charm implementation of the legacy pgsql interface. The same functionality is provided via the modern postgresql_client using “extra-user-roles”.

For more information about migrating the new interface, see this guide.

Supported PostgreSQL versions by modern charm

At the moment, the modern charms support PostgreSQL 14 (based on Jammy/22.04 series) only.

Please contact us if you need different versions/series.

Supported architectures

Currently, the charm supports architecture amd64 (all revisions) and arm64 (from revision 396+).

See the technical details in Supported architectures.

How to report issues and contact authors

The “legacy charm” (from latest/stable) is stored on Launchpad, here is the link to report all legacy charm issues.

The “modern charm” (from 14/stable) is stored on GitHub, here is the link to report modern charm issues.

Do you have questions? Contact us!