xluffy / til

You only feel happy when you know what you doing
20 stars 1 forks source link

pgbouncer auth_query and auth_user pro tips #216

Open xluffy opened 1 year ago

xluffy commented 1 year ago

One of these nifty features that I want to share about is theauth_user andauth_query combo that serves as an alternative to the default authentication process that uses userlist.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