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 468 11 Sep 2024
Ubuntu 22.04
14/stable 467 11 Sep 2024
Ubuntu 22.04
14/candidate 468 02 Sep 2024
Ubuntu 22.04
14/candidate 467 02 Sep 2024
Ubuntu 22.04
14/beta 468 02 Sep 2024
Ubuntu 22.04
14/beta 467 02 Sep 2024
Ubuntu 22.04
14/edge 482 27 Sep 2024
Ubuntu 22.04
14/edge 481 27 Sep 2024
Ubuntu 22.04
juju deploy postgresql --channel 14/stable
Show information

Platform:

Ubuntu
22.04 20.04 18.04 16.04 14.04

Note: All commands are written for juju >= v.3.0

If you are using an earlier version, check the Juju 3.0 Release Notes.

How to manage client applications

Integrations (formerly “relations”) are connections between two applications with compatible endpoints. These connections simplify the creation and management of users, passwords, and other shared data.

Create an integration

Integrations with new applications are supported via the postgresql_client interface.

To create an integration, run

juju integrate postgresql <application>

To remove an integration to an application:

juju remove-relation postgresql <application>

Legacy pgsql interface

We have also added support for the database legacy relation from the original version of the charm via the pgsql interface. Note that this interface is deprecated.

juju integrate postgresql:db <application>

Extended permissions can be requested using the db-admin endpoint:

juju integrate postgresql:db-admin <application>

Rotate application passwords

To rotate the passwords of users created for integrated applications, the integration should be removed and integrated again. This process will generate a new user and password for the application.

juju remove-relation <application> postgresql
juju integrate <application> postgresql

Internal operator user

The operator user is used internally by the Charmed PostgreSQL VM Operator. The set-password action can be used to rotate its password.

To set a specific password for the operator user, run

juju run postgresql/leader set-password password=<password>

To randomly generate a password for the operator user, run

juju run postgresql/leader set-password

Help improve this document in the forum (guidelines). Last updated 4 months ago.