From a16362833877dbfab05fb30ad55024e335a5cde6 Mon Sep 17 00:00:00 2001 From: Vitaliy Kukharik <37010174+vitabaks@users.noreply.github.com> Date: Tue, 7 Nov 2023 22:26:08 +0300 Subject: [PATCH] PgBouncer: Add max_prepared_statements option (#497) --- roles/pgbouncer/templates/pgbouncer.ini.j2 | 2 +- vars/main.yml | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/roles/pgbouncer/templates/pgbouncer.ini.j2 b/roles/pgbouncer/templates/pgbouncer.ini.j2 index 897f0e93b..23c7a1e20 100644 --- a/roles/pgbouncer/templates/pgbouncer.ini.j2 +++ b/roles/pgbouncer/templates/pgbouncer.ini.j2 @@ -33,7 +33,7 @@ reserve_pool_timeout = 1 max_db_connections = {{ pgbouncer_max_db_connections }} pkt_buf = 8192 listen_backlog = 4096 - +max_prepared_statements = {{ pgbouncer_max_prepared_statements }} so_reuseport = 1 log_connections = 0 diff --git a/vars/main.yml b/vars/main.yml index d116a46bf..27102e65d 100644 --- a/vars/main.yml +++ b/vars/main.yml @@ -303,6 +303,7 @@ pgbouncer_listen_addr: "0.0.0.0" pgbouncer_listen_port: 6432 pgbouncer_max_client_conn: 10000 pgbouncer_max_db_connections: 1000 +pgbouncer_max_prepared_statements: 1024 pgbouncer_default_pool_size: 20 pgbouncer_query_wait_timeout: 120 pgbouncer_default_pool_mode: "session"