From 25ba3003a3bffaa72c62ab6a542b274ae4e13184 Mon Sep 17 00:00:00 2001 From: Alexander Bayandin Date: Tue, 17 Oct 2023 08:37:24 +0100 Subject: [PATCH] [bitnami/pgbouncer] Add max_prepared_statements to available environment variables (#51902) --- .../1/debian-11/rootfs/opt/bitnami/scripts/libpgbouncer.sh | 1 + .../1/debian-11/rootfs/opt/bitnami/scripts/pgbouncer-env.sh | 2 ++ bitnami/pgbouncer/README.md | 1 + 3 files changed, 4 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 027986c84361..c80cdf37a8a6 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 @@ -290,6 +290,7 @@ pgbouncer_initialize() { "query_timeout:${PGBOUNCER_QUERY_TIMEOUT}" "query_wait_timeout:${PGBOUNCER_QUERY_WAIT_TIMEOUT}" "client_idle_timeout:${PGBOUNCER_CLIENT_IDLE_TIMEOUT}" + "max_prepared_statements:${PGBOUNCER_MAX_PREPARED_STATEMENTS}" ) for pair in "${key_value_pairs[@]}"; do local key value 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 611d03995271..f47f7695adef 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 @@ -86,6 +86,7 @@ pgbouncer_env_vars=( PGBOUNCER_SOCKET_GROUP PGBOUNCER_DAEMON_USER PGBOUNCER_DAEMON_GROUP + PGBOUNCER_MAX_PREPARED_STATEMENTS ) for env_var in "${pgbouncer_env_vars[@]}"; do file_env_var="${env_var}_FILE" @@ -138,6 +139,7 @@ export PGBOUNCER_RESERVE_POOL_TIMEOUT="${PGBOUNCER_RESERVE_POOL_TIMEOUT:-}" export PGBOUNCER_IGNORE_STARTUP_PARAMETERS="${PGBOUNCER_IGNORE_STARTUP_PARAMETERS:-}" export PGBOUNCER_EXTRA_FLAGS="${PGBOUNCER_EXTRA_FLAGS:-}" export PGBOUNCER_STATS_PERIOD="${PGBOUNCER_STATS_PERIOD:-60}" +export PGBOUNCER_MAX_PREPARED_STATEMENTS="${PGBOUNCER_MAX_PREPARED_STATEMENTS:-}" # 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 2f0693c5d279..26574e999051 100644 --- a/bitnami/pgbouncer/README.md +++ b/bitnami/pgbouncer/README.md @@ -135,6 +135,7 @@ To expose the same database name as the backend, set `PGBOUNCER_DATABASE="$POSTG * `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. +* `PGBOUNCER_MAX_PREPARED_STATEMENTS`: PgBouncer maximum number of cached prepared statements. Default: **0 (disabled)**. ### Initializing a new instance