Installer pgbouncer , configurer le .ini :
cat /etc/pgbouncer/pgbouncer.ini
[databases]
<aliasBDD> = dbname=test user=pg_test port=5433 pool_size=48
[pgbouncer]
logfile = /var/log/pgbouncer/pgbouncer.log
pidfile = /var/run/pgbouncer/pgbouncer.pid
auth_file = /etc/pgbouncer/userlist.txt
listen_addr = <hostname>-pgb
listen_port = 5432
auth_type = trust
admin_users = pgbouncer
stats_users = monitor
pool_mode = transaction
#server_reset_query =
server_reset_query =
max_client_conn = 1800
default_pool_size = 20
unix_socket_dir = /tmp
ignore_startup_parameters = extra_float_digits, application_name
server_check_query = select 1
server_check_delay = 10
log_connections = 1
log_disconnections = 1
log_pooler_errors = 1
Se connecter au pgbouncer :
su – pgbouncer
psql
show databases : affiche les databases liés
Laisser un commentaire