Skip to main content
Glama
yty-build
by yty-build
pgbouncer.ini2.42 kB
[databases] ; Database connection string will be populated from environment variables ; Format: dbname = host=hostname port=port dbname=dbname * = host=${POSTGRES_HOST} port=${POSTGRES_PORT} dbname=${POSTGRES_DATABASE} [pgbouncer] ; Listen address and port listen_addr = 0.0.0.0 listen_port = 6432 ; PID file (required for daemon mode) pidfile = /var/run/pgbouncer/pgbouncer.pid ; Logging logfile = /var/log/pgbouncer/pgbouncer.log ; Authentication ; Use plain for client connections, PgBouncer will handle server auth auth_type = plain auth_file = /etc/pgbouncer/userlist.txt ; Connection pooling mode ; transaction = transaction-level pooling (recommended for this use case) pool_mode = transaction ; Connection pool size ; Maximum number of client connections max_client_conn = 100 ; Maximum number of server connections per database default_pool_size = 15 ; Minimum number of server connections to keep open min_pool_size = 2 ; Reserve pool size (emergency connections) reserve_pool_size = 5 ; Timeout settings ; Server idle timeout (close idle server connections after this time) ; 600 seconds = 10 minutes server_idle_timeout = 600 ; Query timeout (0 = disabled, allows long-running queries) ; IMPORTANT: Set to 0 to allow queries that take 5-10+ minutes query_timeout = 0 ; Client idle timeout client_idle_timeout = 3600 ; Server connection lifetime (0 = unlimited) server_lifetime = 3600 ; Connection timeout server_connect_timeout = 15 ; Server check query server_check_query = SELECT 1 ; Server check delay server_check_delay = 30 ; DNS settings ; How often to check for DNS updates dns_max_ttl = 15 dns_zone_check_period = 0 ; Logging log_connections = 1 log_disconnections = 1 log_pooler_errors = 1 log_stats = 1 stats_period = 60 ; Admin interface admin_users = postgres stats_users = postgres ; Console access ; unix_socket_dir = /var/run/pgbouncer ; unix_socket_mode = 0777 ; Disable dangerous commands disable_pqexec = 0 ; Application name passthrough application_name_add_host = 1 ; TCP settings tcp_keepalive = 1 tcp_keepidle = 60 tcp_keepintvl = 10 tcp_keepcnt = 5 ; Security ignore_startup_parameters = extra_float_digits ; SSL Configuration for server connections (PgBouncer → PostgreSQL) ; REQUIRED for AWS RDS PostgreSQL connections server_tls_sslmode = require server_tls_protocols = secure server_tls_ciphers = default ; Verbose mode (0 = off, 1 = on) verbose = 0

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/yty-build/postgres_mcp_allaccess'

If you have feedback or need assistance with the MCP directory API, please join our Discord server