diff --git a/bitnami/pgbouncer/1/debian-12/rootfs/opt/bitnami/scripts/libpgbouncer.sh b/bitnami/pgbouncer/1/debian-12/rootfs/opt/bitnami/scripts/libpgbouncer.sh index 5e66786195c3..5a9a07a40da9 100644 --- a/bitnami/pgbouncer/1/debian-12/rootfs/opt/bitnami/scripts/libpgbouncer.sh +++ b/bitnami/pgbouncer/1/debian-12/rootfs/opt/bitnami/scripts/libpgbouncer.sh @@ -296,6 +296,7 @@ pgbouncer_initialize() { "log_pooler_errors:${PGBOUNCER_LOG_POOLER_ERRORS}" "log_stats:${PGBOUNCER_LOG_STATS}" "stats_period:${PGBOUNCER_STATS_PERIOD}" + "server_round_robin:${PGBOUNCER_SERVER_ROUND_ROBIN}" "server_fast_close:${PGBOUNCER_SERVER_FAST_CLOSE}" "server_lifetime:${PGBOUNCER_SERVER_LIFETIME}" "server_idle_timeout:${PGBOUNCER_SERVER_IDLE_TIMEOUT}" diff --git a/bitnami/pgbouncer/1/debian-12/rootfs/opt/bitnami/scripts/pgbouncer-env.sh b/bitnami/pgbouncer/1/debian-12/rootfs/opt/bitnami/scripts/pgbouncer-env.sh index 2e693c7139e0..dfe78f5d86f2 100644 --- a/bitnami/pgbouncer/1/debian-12/rootfs/opt/bitnami/scripts/pgbouncer-env.sh +++ b/bitnami/pgbouncer/1/debian-12/rootfs/opt/bitnami/scripts/pgbouncer-env.sh @@ -52,6 +52,7 @@ pgbouncer_env_vars=( PGBOUNCER_MAX_PREPARED_STATEMENTS PGBOUNCER_EXTRA_FLAGS PGBOUNCER_FAIL_ON_INVALID_DSN_FILE + PGBOUNCER_SERVER_ROUND_ROBIN PGBOUNCER_CLIENT_TLS_SSLMODE PGBOUNCER_CLIENT_TLS_CA_FILE PGBOUNCER_CLIENT_TLS_CERT_FILE @@ -144,6 +145,7 @@ export PGBOUNCER_STATS_PERIOD="${PGBOUNCER_STATS_PERIOD:-60}" export PGBOUNCER_MAX_PREPARED_STATEMENTS="${PGBOUNCER_MAX_PREPARED_STATEMENTS:-}" export PGBOUNCER_EXTRA_FLAGS="${PGBOUNCER_EXTRA_FLAGS:-}" export PGBOUNCER_FAIL_ON_INVALID_DSN_FILE="${PGBOUNCER_FAIL_ON_INVALID_DSN_FILE:-false}" +export PGBOUNCER_SERVER_ROUND_ROBIN="${PGBOUNCER_SERVER_ROUND_ROBIN:-0}" # Client TLS settings export PGBOUNCER_CLIENT_TLS_SSLMODE="${PGBOUNCER_CLIENT_TLS_SSLMODE:-disable}" diff --git a/bitnami/pgbouncer/README.md b/bitnami/pgbouncer/README.md index a4e99279f526..2dc44dad3793 100644 --- a/bitnami/pgbouncer/README.md +++ b/bitnami/pgbouncer/README.md @@ -79,6 +79,7 @@ docker build -t bitnami/APP:latest . | `PGBOUNCER_STATS_USERS` | PgBouncer comma-separated list of database users that are allowed to connect and run read-only queries. | `nil` | | `PGBOUNCER_POOL_MODE` | PgBouncer pool mode. Allowed values: session (default), transaction and statement. | `nil` | | `PGBOUNCER_INIT_SLEEP_TIME` | PgBouncer initialization sleep time | `10` | +| `PGBOUNCER_SERVER_ROUND_ROBIN` | Defaults to LIFO server connection (0) reuse for performance but recommends uniform usage for systems with round-robin (1) setups to evenly distribute load. | `0` | | `PGBOUNCER_SERVER_FAST_CLOSE` | Disconnect a server in session pooling mode immediately or after the end of the current transaction if it is in `close_needed` mode, rather than waiting for the session end (default: 0). | `0` | | `PGBOUNCER_INIT_MAX_RETRIES` | PgBouncer initialization maximum retries | `10` | | `PGBOUNCER_QUERY_WAIT_TIMEOUT` | PgBouncer maximum time queries are allowed to spend waiting for execution (default: 120). | `nil` |