Charmed PgBouncer

Channel Revision Published Runs on
latest/stable 5 17 Jan 2022
Ubuntu 20.04 Ubuntu 18.04 Ubuntu 16.04
1/stable 89 21 Feb 2024
Ubuntu 20.04
1/candidate 176 06 May 2024
Ubuntu 20.04
1/beta 176 30 Apr 2024
Ubuntu 20.04
1/edge 180 30 Apr 2024
Ubuntu 20.04
juju deploy pgbouncer --channel 1/edge
Show information

Platform:

Ubuntu
20.04

Interfaces/endpoints

PgBouncer supports modern ‘postgresql_client’ interface. Applications can easily connect PgBouncer 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. Read more about Juju relations (integrations). Example:

# Deploy Charmed PostgreSQL and PgBouncer clusters
juju deploy postgresql -n 3 --channel 14/stable
juju deploy pgbouncer -n 3 --channel 1/stable

# Deploy the relevant charms, e.g. postgresql-test-app
juju deploy postgresql-test-app

# Relate all applications
juju integrate postgresql pgbouncer
juju integrate pgbouncer postgresql-test-app:first-database

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

# Example of the properly established relation:
# > Integration provider     Requirer                              Interface              Type     Message
# > pgbouncer:database       postgresql-test-app:first-database    postgresql_client      regular  
# > postgresql:database      pgbouncer:backend-database            postgresql_client      regular  
# > ...

See all the charm interfaces here.


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