0

I have postgres with hba configuration file and pgbouncer for connection pooling.

I want to connect to pgbouncer (instead of postgres) only by changing the port number of the connection string (6543 instead of 5432). Both postgres and pgbouncer run on the same server.

So far, I've been able to have pgbouncer run with its own hba file with duplicated user/password. It's not maintainable (or at least very painful) to manually sync postgres and pgbouncer user/password.

Is there any way I can make pgbouncer forward user/password login attempts to postgres as-is? Or am I trying to work my conf against the way things should go?

Benjamin Toueg
  • 10,511
  • 7
  • 48
  • 79

1 Answers1

1

Which version of pgbouncer do you use? Starting from 1.6 it is able to load users/passwords directly from database. You just need to specify "auth_query" in your config file. https://pgbouncer.github.io/config.html

CyberDem0n
  • 14,545
  • 1
  • 34
  • 24