0

I have an active pgBouncer setup with one PostgreSQL server.

We are planning to add one more PostgreSQL server to the same pgBouncer. But the problem is that both databases servers have the same username, but with different passwords.

Server1:

  • user: admin
  • password: admin123

Server2:

  • user: admin
  • password: admin@213

This feature is already requested here, can someone help me with any possible solutions?

1 Answer 1

0

There is a good workaround at the link in your question.

Another thing you can try is to use auth_user and auth_query with pgBouncer so that it fetches the password from the respective database. I am not sure if that works or if pgBouncer caches the password for each user.

5
  • In that Github link, Im not sure how to do that, any idea?
    – TheDataGuy
    Sep 11, 2020 at 6:00
  • This maps two different user names to the same user on different databases. So when you want to connect to admin on the first database, you use user admin1, and a different name for the other database. Sep 11, 2020 at 6:09
  • cybertec-postgresql.com/en/pgbouncer-authentication-made-easy -- Is this the one explained in the answer?
    – TheDataGuy
    Sep 11, 2020 at 6:15
  • Yes, that is my idea. You can try if it works. Sep 11, 2020 at 6:22
  • Sure, thank you so much
    – TheDataGuy
    Sep 11, 2020 at 6:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.