til
til copied to clipboard
pgbouncer auth_query and auth_user pro tips
One of these nifty features that I want to share about is the
auth_user
andauth_query
combo that serves as an alternative to the default authentication process that usesuserlist.txt
.
“What’s wrong with userlist.txt” you may ask. For starters, it makes user/role administration a little tricky. Every time you add a new user to PG, you need to add it to
userlist.txt
in PgBouncer. And every time you change a password, you have to change it in userlist.txt as well. Multiply that by the 30+ servers you’re managing, and you’ve got a sysadmin’s nightmare on your hands. Withauth_user
andauth_query
, you can centralize the password management and take one item off your checklist.
https://www.enterprisedb.com/postgres-tutorials/pgbouncer-authquery-and-authuser-pro-tips