feat: leverage pgbouncer's auth_dbname by phisco · Pull Request #4939 · cloudnative-pg/cloudnative-pg

@phisco changed the title feat: leverage auth_dbname for pooler feat: leverage auth_dbname for poolers

Jun 24, 2024

@phisco phisco changed the title feat: leverage auth_dbname for poolers feat: leverage pgbouncer's auth_dbname

Jun 24, 2024

@phisco phisco marked this pull request as ready for review

June 30, 2024 12:32

@phisco @sxd

Signed-off-by: Philippe Scorsolini <p.scorsolini@gmail.com>

leonardoce added a commit to leonardoce/cloudnative-pg that referenced this pull request

Sep 26, 2025
Previously, CloudNativePG configured authentication by creating a
`user_search` function in every accessible database and granting CONNECT
privileges to the PgBouncer auth_user.

This patch simplifies the process by using the `auth_dbname`
configuration option, so that PgBouncer runs its authentication queries
only against the `postgres` database. This results in a simpler
reconciliation loop with no extra connections required for other
databases.

Closes: cloudnative-pg#4939

Signed-off-by: Leonardo Cecchi <leonardo.cecchi@enterprisedb.com>