Limits user connection in pgbouncer

From: Daulat <daulat(dot)dba(at)gmail(dot)com>
To: pgsql-admin <pgsql-admin(at)lists(dot)postgresql(dot)org>
Subject: Limits user connection in pgbouncer
Date: 2021-12-13 08:05:30
Message-ID: CALfOM6Kjqq5RGDj7K5KWRqX8YcCNFriN258H4jW418Nb8FC7EA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Hello Team,
How can we limit the user to make a specific number of connections to the
database?

Suppose, I have a user "user1" and I want to limit it to make only 2
connections. I have tried but not done.

Here are my pgbouncer.ini options.

db1 = host=localhost dbname=db1
logfile = /var/log/pgbouncer/pgbouncer.log
pidfile = /var/run/pgbouncer/pgbouncer.pid
listen_addr = *
listen_port = 6432
auth_type = md5
auth_file = /etc/pgbouncer/userlist.txt
admin_users = postgres
pool_mode = session
max_client_conn = 300
max_db_connections = 2
max_user_connections = 2

Thanks

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Achilleas Mantzios 2021-12-13 08:42:39 Re: Limits user connection in pgbouncer
Previous Message dbatoCloud Solution 2021-12-13 06:26:40 postgresql dbms_utility error !