From 22686c907da5a29dc88e07347bed6eeab282658c Mon Sep 17 00:00:00 2001 From: Jannis R Date: Thu, 18 Jan 2024 10:13:30 +0100 Subject: [PATCH] pgbouncer: make server_fast_close configurable via env var (#54732) [bitnami/pgbouncer] Add server_fast_close to available environment variables Signed-off-by: Jannis R --- .../1/debian-11/rootfs/opt/bitnami/scripts/libpgbouncer.sh | 1 + .../1/debian-11/rootfs/opt/bitnami/scripts/pgbouncer-env.sh | 1 + bitnami/pgbouncer/README.md | 1 + 3 files changed, 3 insertions(+) diff --git a/bitnami/pgbouncer/1/debian-11/rootfs/opt/bitnami/scripts/libpgbouncer.sh b/bitnami/pgbouncer/1/debian-11/rootfs/opt/bitnami/scripts/libpgbouncer.sh index 2f52b7dbfb40..e157ba055b52 100644 --- a/bitnami/pgbouncer/1/debian-11/rootfs/opt/bitnami/scripts/libpgbouncer.sh +++ b/bitnami/pgbouncer/1/debian-11/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_fast_close:${PGBOUNCER_SERVER_FAST_CLOSE}" "server_lifetime:${PGBOUNCER_SERVER_LIFETIME}" "server_idle_timeout:${PGBOUNCER_SERVER_IDLE_TIMEOUT}" "server_connect_timeout:${PGBOUNCER_SERVER_CONNECT_TIMEOUT}" diff --git a/bitnami/pgbouncer/1/debian-11/rootfs/opt/bitnami/scripts/pgbouncer-env.sh b/bitnami/pgbouncer/1/debian-11/rootfs/opt/bitnami/scripts/pgbouncer-env.sh index e17b76121fb0..d98ea70218e0 100644 --- a/bitnami/pgbouncer/1/debian-11/rootfs/opt/bitnami/scripts/pgbouncer-env.sh +++ b/bitnami/pgbouncer/1/debian-11/rootfs/opt/bitnami/scripts/pgbouncer-env.sh @@ -142,6 +142,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_FAST_CLOSE="${PGBOUNCER_SERVER_FAST_CLOSE:-}" # 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 514447bd9845..33cdf2f5bda1 100644 --- a/bitnami/pgbouncer/README.md +++ b/bitnami/pgbouncer/README.md @@ -136,6 +136,7 @@ To expose a ["fallback database" (wildcard that matches any)](https://www.pgboun * `PGBOUNCER_MIN_POOL_SIZE` : PgBouncer has at least this amount of open connections. Default: **0 (disabled)**. * `PGBOUNCER_RESERVE_POOL_SIZE` : PgBouncer allows this amount of additional connections. Default: **0 (disabled)**. * `PGBOUNCER_IGNORE_STARTUP_PARAMETERS`: you can use this to set `ignore_startup_parameters` in the auto-generated `pgbouncer.ini`. This can be useful for solving certain connection issues. See config.html for more details. +* `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** * `PGBOUNCER_SERVER_IDLE_TIMEOUT`: PgBouncer maximum time in seconds a server connection can be idle. If 0 then the timeout is disabled. Default: **600** * `PGBOUNCER_SERVER_RESET_QUERY`: PgBouncer query sent to server on connection release before making it available to other clients. Default: **DISCARD ALL** * `PGBOUNCER_STATS_USERS`: PgBouncer comma-separated list of database users that are allowed to connect and run read-only queries. No defaults.