2023-02-07 23:34:53 +00:00
|
|
|
[databases]
|
|
|
|
{% for pool in pgbouncer_pools %}
|
|
|
|
{{ pool.name }} = host={{ pool.host | default('127.0.0.1') }} port={{ pool.port | default('5432') }} dbname={{ pool.dbname }} {{ pool.pool_parameters }}
|
|
|
|
{% endfor %}
|
|
|
|
|
|
|
|
* = host=127.0.0.1 port={{ pgbouncer_postgresql_port | default('5432') }}
|
|
|
|
|
|
|
|
[pgbouncer]
|
|
|
|
{% if pgbouncer_client_tls_sslmode != 'disable' %}
|
|
|
|
client_tls_sslmode = {{ pgbouncer_client_tls_sslmode }}
|
|
|
|
client_tls_protocols = {{ pgbouncer_client_tls_protocols }}
|
|
|
|
client_tls_ciphers = {{ pgbouncer_client_tls_ciphers }}
|
|
|
|
client_tls_key_file = {{ pgbouncer_client_tls_key_file }}
|
|
|
|
client_tls_cert_file = {{ pgbouncer_client_tls_cert_file }}
|
|
|
|
{% endif %}
|
|
|
|
{% if pgbouncer_server_tls_sslmode != 'disable' %}
|
|
|
|
server_tls_sslmode = {{ pgbouncer_server_tls_sslmode }}
|
|
|
|
{% endif %}
|
|
|
|
logfile = {{ pgbouncer_log_dir }}/{{ pgbouncer_log_name }}
|
|
|
|
pidfile = {{ pgbouncer_pid_dir }}/{{ pgbouncer_pid_name }}
|
2023-05-11 11:12:15 +00:00
|
|
|
listen_addr = {{ pgbouncer_listen_addr }}
|
|
|
|
listen_port = {{ pgbouncer_listen_port }}
|
2023-02-07 23:34:53 +00:00
|
|
|
unix_socket_dir = /var/run/postgresql
|
|
|
|
auth_type = {{ pgbouncer_auth_type }}
|
|
|
|
auth_file = {{ pgbouncer_auth_file }}
|
|
|
|
{% if pgbouncer_auth_user is defined %}
|
|
|
|
auth_user = {{ pgbouncer_auth_user }}
|
|
|
|
{% endif %}
|
|
|
|
{% if pgbouncer_auth_type == 'hba' %}
|
|
|
|
auth_hba_file = {{ pgbouncer_auth_hba_file }}
|
|
|
|
{% endif %}
|
|
|
|
admin_users = {{ pgbouncer_admin_users }}
|
|
|
|
ignore_startup_parameters = {{ pgbouncer_ignore_startup_parameters }}
|
|
|
|
|
|
|
|
pool_mode = {{ pgbouncer_default_pool_mode }}
|
|
|
|
server_reset_query = DISCARD ALL
|
|
|
|
max_client_conn = {{ pgbouncer_max_client_conn }}
|
|
|
|
default_pool_size = {{ pgbouncer_default_pool_size }}
|
2024-03-19 11:08:09 +00:00
|
|
|
reserve_pool_size = {{ pgbouncer_reserve_pool_size }}
|
2023-02-07 23:34:53 +00:00
|
|
|
reserve_pool_timeout = 1
|
|
|
|
max_db_connections = {{ pgbouncer_max_db_connections }}
|
2024-08-01 15:36:54 +00:00
|
|
|
server_lifetime = {{ pgbouncer_server_lifetime }}
|
|
|
|
server_idle_timeout = {{ pgbouncer_server_idle_timeout }}
|
|
|
|
|
2023-02-07 23:34:53 +00:00
|
|
|
pkt_buf = 8192
|
|
|
|
listen_backlog = 4096
|
|
|
|
|
|
|
|
log_connections = 0
|
|
|
|
log_disconnections = 0
|
|
|
|
|
|
|
|
# Documentation https://pgbouncer.github.io/config.html
|