pgBouncer is a lightweight connection pooler for PostgreSQL databases.
The following features are supported by the crunchy-pgbouncer container:
- crunchy-pgbouncer uses
auth_queryto authenticate users. This requires the
pgbouncerusername and password in
users.txt. Automatically generated from environment variables, see Restrictions.
- Mount a custom
pgbouncer.iniconfigurations for advanced usage.
- Tune pooling parameters via environment variables.
- Connect to the administration database in pgBouncer to view statistics of the target databases.
The crunchy-pgbouncer Docker image contains the following packages (versions vary depending on PostgreSQL version):
- PostgreSQL (15.2, 14.7, 13.10, 12.14 and 11.19)
- UBI 8 - publicly available
- UBI 8 - customers only
- OpenShift: If custom configurations aren’t being mounted, an emptydir volume is required
to be mounted at
- Superusers cannot connect through the connection pooler.
- User is required to configure the database for auth_query, see pgbouncer.ini file for configuration details.
|The password of the pgBouncer role in PostgreSQL. Must be also set on the primary database.
|The hostname of the database service.
|How many server connections to allow per user/database pair.
|Maximum number of client connections allowed.
|Do not allow more than this many connections per-database.
|Adds more server connections to pool if below this number.
|When a server connection can be reused by other clients. Possible values:
|How many additional connections to allow per pool. 0 disables.
|If a client has not been serviced in this many seconds, pgbouncer enables use of additional connections from reserve pool. 0 disables.
|Queries running longer than that are canceled.
|Set to ignore particular parameters in startup packets.
|The port to use when connecting to the database.
|Set this to true to enable debugging in logs. Note: this mode can reveal secrets in logs.