mirror of
https://github.com/bitnami/containers.git
synced 2026-02-23 08:57:25 +08:00
Merge pull request #25 from eggshell/master
Add support for 3 new pgbouncer.ini config options
This commit is contained in:
@@ -226,6 +226,7 @@ pgbouncer_initialize() {
|
||||
"pidfile:${PGBOUNCER_PID_FILE}"
|
||||
"logfile:${PGBOUNCER_LOG_FILE}"
|
||||
"admin_users:${POSTGRESQL_USERNAME}"
|
||||
"stats_users:${PGBOUNCER_STATS_USERS}"
|
||||
"client_tls_sslmode:${PGBOUNCER_CLIENT_TLS_SSLMODE}"
|
||||
"server_tls_sslmode:${PGBOUNCER_SERVER_TLS_SSLMODE}"
|
||||
"query_wait_timeout:${PGBOUNCER_QUERY_WAIT_TIMEOUT}"
|
||||
@@ -233,6 +234,8 @@ pgbouncer_initialize() {
|
||||
"max_client_conn:${PGBOUNCER_MAX_CLIENT_CONN}"
|
||||
"max_db_connections:${PGBOUNCER_MAX_DB_CONNECTIONS}"
|
||||
"idle_transaction_timeout:${PGBOUNCER_IDLE_TRANSACTION_TIMEOUT}"
|
||||
"server_idle_timeout:${PGBOUNCER_SERVER_IDLE_TIMEOUT}"
|
||||
"server_reset_query:${PGBOUNCER_SERVER_RESET_QUERY}"
|
||||
"default_pool_size:${PGBOUNCER_DEFAULT_POOL_SIZE}"
|
||||
"min_pool_size:${PGBOUNCER_MIN_POOL_SIZE}"
|
||||
"reserve_pool_size:${PGBOUNCER_RESERVE_POOL_SIZE}"
|
||||
|
||||
@@ -27,6 +27,7 @@ pgbouncer_env_vars=(
|
||||
PGBOUNCER_AUTH_USER
|
||||
PGBOUNCER_AUTH_QUERY
|
||||
PGBOUNCER_AUTH_TYPE
|
||||
PGBOUNCER_STATS_USERS
|
||||
PGBOUNCER_POOL_MODE
|
||||
PGBOUNCER_INIT_SLEEP_TIME
|
||||
PGBOUNCER_INIT_MAX_RETRIES
|
||||
@@ -34,6 +35,8 @@ pgbouncer_env_vars=(
|
||||
PGBOUNCER_MAX_CLIENT_CONN
|
||||
PGBOUNCER_MAX_DB_CONNECTIONS
|
||||
PGBOUNCER_IDLE_TRANSACTION_TIMEOUT
|
||||
PGBOUNCER_SERVER_IDLE_TIMEOUT
|
||||
PGBOUNCER_SERVER_RESET_QUERY
|
||||
PGBOUNCER_DEFAULT_POOL_SIZE
|
||||
PGBOUNCER_MIN_POOL_SIZE
|
||||
PGBOUNCER_RESERVE_POOL_SIZE
|
||||
@@ -93,6 +96,7 @@ export PGBOUNCER_LISTEN_ADDRESS="${PGBOUNCER_LISTEN_ADDRESS:-0.0.0.0}"
|
||||
export PGBOUNCER_AUTH_USER="${PGBOUNCER_AUTH_USER:-}"
|
||||
export PGBOUNCER_AUTH_QUERY="${PGBOUNCER_AUTH_QUERY:-}"
|
||||
export PGBOUNCER_AUTH_TYPE="${PGBOUNCER_AUTH_TYPE:-md5}"
|
||||
export PGBOUNCER_STATS_USERS="${PGBOUNCER_STATS_USERS:-}"
|
||||
export PGBOUNCER_POOL_MODE="${PGBOUNCER_POOL_MODE:-}"
|
||||
export PGBOUNCER_INIT_SLEEP_TIME="${PGBOUNCER_INIT_SLEEP_TIME:-10}"
|
||||
export PGBOUNCER_INIT_MAX_RETRIES="${PGBOUNCER_INIT_MAX_RETRIES:-10}"
|
||||
@@ -105,6 +109,8 @@ export PGBOUNCER_MIN_POOL_SIZE="${PGBOUNCER_MIN_POOL_SIZE:-}"
|
||||
export PGBOUNCER_RESERVE_POOL_SIZE="${PGBOUNCER_RESERVE_POOL_SIZE:-}"
|
||||
export PGBOUNCER_IGNORE_STARTUP_PARAMETERS="${PGBOUNCER_IGNORE_STARTUP_PARAMETERS:-}"
|
||||
export PGBOUNCER_EXTRA_FLAGS="${PGBOUNCER_EXTRA_FLAGS:-}"
|
||||
export PGBOUNCER_SERVER_IDLE_TIMOUT="${PGBOUNCER_SERVER_IDLE_TIMOUT:-}"
|
||||
export PGBOUNCER_SERVER_RESET_QUERY="${PGBOUNCER_SERVER_RESET_QUERY:-}"
|
||||
|
||||
# Client TLS settings
|
||||
export PGBOUNCER_CLIENT_TLS_SSLMODE="${PGBOUNCER_CLIENT_TLS_SSLMODE:-disable}"
|
||||
|
||||
@@ -127,6 +127,9 @@ To expose the same database name as the backend, set `PGBOUNCER_DATABASE="$POSTG
|
||||
- `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 https://www.pgbouncer.org/config.html for more details.
|
||||
- `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.
|
||||
|
||||
### Initializing a new instance
|
||||
|
||||
|
||||
Reference in New Issue
Block a user