;;
;;  pgbouncer.ini -- PgBouncer Server Configuration
;;

[databases]

*                         = host=127.0.0.1 port=5432

[pgbouncer]

logfile                   = @l_prefix@/var/pgbouncer/log/pgbouncer.log
pidfile                   = @l_prefix@/var/pgbouncer/run/pgbouncer.pid

listen_addr               = 127.0.0.1
listen_port               = 6432

unix_socket_dir           = @l_prefix@/var/pgbouncer/run/pgbouncer.socket
unix_socket_mode          = 0777
unix_socket_group         = @l_rgrp@

client_tls_sslmode        = allow
client_tls_ca_file        = @l_prefix@/etc/x509/example-ca.crt.pem
client_tls_cert_file      = @l_prefix@/etc/x509/example-server.crt.pem
client_tls_key_file       = @l_prefix@/etc/x509/example-server.key.pem
client_tls_ciphers        = secure
client_tls_protocols      = tlsv1.2
client_tls_dheparams      = auto
client_tls_ecdhcurve      = auto

server_tls_sslmode        = disable
server_tls_ca_file        = @l_prefix@/etc/x509/example-ca.crt.pem
server_tls_cert_file      = @l_prefix@/etc/x509/example-server.crt.pem
server_tls_key_file       = @l_prefix@/etc/x509/example-server.key.pem
server_tls_protocols      = tlsv1.2
server_tls_ciphers        = secure

auth_type                 = any
auth_file                 = @l_prefix@/etc/pgbouncer/userlist.txt

admin_users               = root
stats_users               = root

pool_mode                 = session
server_reset_query        = DISCARD ALL
server_reset_query_always = 0
ignore_startup_parameters = extra_float_digits
server_check_query        = SELECT 1
server_check_delay        = 30
application_name_add_host = 0

max_client_conn           = 100
default_pool_size         = 20
min_pool_size             = 0
reserve_pool_size         = 5
reserve_pool_timeout      = 3
max_db_connections        = 50
max_user_connections      = 50
server_round_robin        = 0

syslog                    = 0
syslog_facility           = daemon
syslog_ident              = pgbouncer
log_connections           = 1
log_disconnections        = 1
log_pooler_errors         = 1
stats_period              = 60
verbose                   = 0

server_lifetime           = 1200
server_idle_timeout       = 60
server_connect_timeout    = 15
server_login_retry        = 15
query_timeout             = 0
query_wait_timeout        = 120
client_idle_timeout       = 0
client_login_timeout      = 60
autodb_idle_timeout       = 3600
suspend_timeout           = 10
idle_transaction_timeout  = 0

