pgbouncer

From: Nicola Contu <nicola(dot)contu(at)gmail(dot)com>
To: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: pgbouncer
Date: 2019-01-17 15:18:25
Message-ID: CAMTZZh3y74kZXxnvofLJxqc3bw0Pz6ddRS5i4LM24Y1MYMRV2A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hello,
I am a bit confused about the settings in pgbouncer

What's exactly the pool_size?
If I set 3, and I tried to connect from 4 shells, I am still able to
connect.
Same thing for max_db_connections. I set this to 1 and I am able to connect
from 2 shells.

This is kind of confusing and I'm not really cleared reading the
documentation.

This is my config.

[databases]
cmdwela = host=127.0.0.1 port=5432 dbname=cmdwela auth_user=pgbouncer
pool_size=120
cicciopasticcio = host=127.0.0.1 port=5432
dbname=cicciopasticcio auth_user=pgbouncer pool_size=2

[pgbouncer]
listen_port = 6543
listen_addr = *
auth_type = md5
auth_file = /etc/pgbouncer/users.txt
auth_query = select uname,phash from user_lookup($1)
logfile = /var/log/pgbouncer.log
pidfile = /home/postgres/pgbouncer.pid
admin_users = admin
user=postgres
max_db_connections=1
log_connections=0
log_disconnections=0
max_client_conn=5

I just want to limit connections from the app etc.

Thanks

Responses

Browse pgsql-general by date

  From Date Subject
Next Message David G. Johnston 2019-01-17 15:32:41 Re: pgbouncer
Previous Message Achilleas Mantzios 2019-01-17 15:15:04 Re: Barman versus pgBackRest