Charmed PostgreSQL

Channel Revision Published Runs on
latest/stable 345 09 Nov 2023
Ubuntu 22.04 Ubuntu 20.04 Ubuntu 18.04 Ubuntu 16.04
14/stable 336 18 Oct 2023
Ubuntu 22.04
14/candidate 336 18 Oct 2023
Ubuntu 22.04
14/beta 336 18 Oct 2023
Ubuntu 22.04
14/edge 350 02 Dec 2023
Ubuntu 22.04
juju deploy postgresql --channel 14/stable
Show information

Platform:

Ubuntu
22.04

How to manage related applications

New postgresql_client interface:

Relations to new applications are supported via the postgresql_client interface. To relate to an application:

juju relate postgresql <application>

To remove a relation 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. Please note that this interface is deprecated.

juju relate postgresql:db <application>

Also extended permissions can be requested using db-admin edpoint:

juju relate postgresql:db-admin <application>

Rotate applications password

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

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

Internal operator user

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

  • To set a specific password for the operator user:
juju run-action postgresql/leader set-password password=<password> --wait
  • To randomly generate a password for the operator user:
juju run-action postgresql/leader set-password --wait