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

Interfaces/endpoints

The charm supports modern postgresql_client and legacy pgsql interfaces (in a backward compatible mode).

Note: do NOT relate both modern and legacy interfaces simultaneously!

Modern interfaces

This charm provides modern ‘postgresql_client’ interface. Applications can easily connect PostgreSQL using ‘data_interfaces’ library from ‘data-platform-libs’.

Modern postgresql_client interface (database endpoint):

Adding a relation is accomplished with juju relate (or juju integrate for Juju 3.x) via endpoint database. Example:

# Deploy Charmed PostgreSQL cluster with 3 nodes
juju deploy postgresql -n 3 --channel 14

# Deploy the relevant application charms
juju deploy mycharm

# Relate PostgreSQL with your application
juju relate postgresql:database mycharm:database

# Check established relation (using postgresql_client interface):
juju status --relations

# Example of the properly established relation:
# > Relation provider      Requirer          Interface          Type
# > postgresql:database    mycharm:database  postgresql_client  regular

Find all details about default and extra DB user roles in “Charm Users explanations”.

Legacy interfaces

Note: Legacy relations are deprecated and will be discontinued on future releases. Usage should be avoided. Check the legacy interfaces implementation limitations in the “Legacy charm” document.

Legacy pgsql interface (db and db-admin endpoints):

This charm supports legacy interface pgsql from the previous PostgreSQL charm:

juju relate postgresql:db mailman3-core
juju relate postgresql:db-admin landscape-server

Note: The endpoint db-admin provides the same legacy interface pgsql with PostgreSQL admin-level privileges. It is NOT recommended to use it from security point of view.


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