Mthaddon Pgbouncer

Channel Version Revision Published Runs on
latest/stable 2 2 30 Nov 2021
Ubuntu 20.04 Ubuntu 18.04 Ubuntu 16.04
juju deploy mthaddon-pgbouncer
Show information
You will need Juju 2.9 to be able to run this command. Learn how to upgrade to Juju 2.9.


16.04 18.04 20.04


Lightweight connection pooler for PostgreSQL. Read more

Discuss this charm

Share your thoughts on this charm with the community on discourse.

Join the discussion


PgBouncer is a lightweight connection pooler for PostgreSQL.



To deploy you'll need at a minimum: a cloud environment, a working Juju installation, and a successful bootstrap. Please refer to the Juju Getting Started documentation before continuing.

It is also recommended that you read the documentation for the postgresql charm so you understand how to set up postgresql in a master-slave relationship.

juju deploy cs:postgresql
juju deploy cs:~postgresql-charmers/pgbouncer
juju deploy cs:~postgresql-charmers/postgresql-client psql

juju add-relation postgresql:db-admin pgbouncer:backend-db-admin
juju add-relation psql:db pgbouncer:db  # Or db-admin


The pgbouncer charm implements the same interface as the PostgreSQL charm. See the PostgreSQL Client Interface for details. Both charms provide the db (standard privileges) and db-admin (administrative privileges) relations, and may be used interchangably.


See config.yaml for configuration options. Further details may be found in the pgbouncer documentation

Extra configuration

Some extra configuration can also be added through the pgbouncer-extra-config relation. Those configurations can be added to the pgbouncer and databases sections. A new config file will be included for each extra configuration.


This charm provides relations that support monitoring via Nagios using cs:nrpe_external_master as a subordinate charm.


This charm is maintained by Stuart Bishop on Launchpad. Please use the main Juju mailing list for general discussions.

Source is available in git at

Bugs should be reported in the Launchpad Bugtracker.