Closed chuegel closed 1 year ago
@chuegel Thank you for your PR
I will look carefully at the code tomorrow.
In the meantime, I would like to invite you to read the article https://www.enterprisedb.com/postgres-tutorials/pgbouncer-authquery-and-authuser-pro-tips
perhaps after reading the article you will make a few more commits ;)
@vitabaks thanks, I will look into it. The PR can be improved for sure.
@chuegel Let me know if you need my help in finalizing this PR.
Thank you @chuegel good job!
Hi,
following this discussion, the PR adds the possibility to use only one user to query the database and perform the authentication via pgbouncer auth_user and auth_query. This will create dynamic pools for each dbname+user combination.
I've tested it with a 3 node Ubuntu 22.04 LTS cluster but I guess it will need additional distributions to run test against.
CAVEAT: this only works if the password for the auth_user is set in plaintext in userlist.txt because there is no actual client doing SCRAM authentication against the database.