I am using PgBouncer with Postgresql.
Besides connections from users. PgBouncer still keeps so much connections from auth_user.
These connections have no other information than query infomation: Insufficient privilege
These connections account for nearly 40% of total connections of DB.
Can I want reduce these connections to make slot for application connections?
My PgBouncer config:
[databases]
* = host=localhost port=1234 auth_user=pgbouncer
[pgbouncer]
listen_port = 1234
listen_addr = *
auth_type = md5
auth_file = ...
auth_query = ...
pidfile = pgbouncer.log
logfile = pgbouncer.pid
admin_users = pgbouncer
stats_users = pgbouncer
default_pool_size = 30
max_client_conn = 2000
max_db_connections = 0
min_pool_size = 0
pool_mode = transaction
reserve_pool_size = 0
reserve_pool_timeout = 5
query_timeout = 0
ignore_startup_parameters = extra_float_digits
It is hard to see how making pgbouncer loop back to itself could do anything useful. Was this just the product if misbegotten anonymization?
Anyway, it will maintain one auth_user connection for every database. You should set auth_dbname to funnel all those connections to one database, where they can be shared.
As said in a previous iteration, monitoring is more effective if you use a user which has sufficient privileges to monitor.