pg.ddx.io  pgbouncer/pgbouncer GitHub issues and pull requests  
help / color / mirror / Atom feed
From: jbaanus (@jbaanus) <noreply+jbaanus@github.com>
To: pgbouncer/pgbouncer <noreply+pgbouncer-pgbouncer@github.com>
Subject: [pgbouncer/pgbouncer] issue #410: [users] section setup not working properly with auth_query
Date: Tue, 27 Aug 2019 21:55:06 +0000
Message-ID: <gh-pgbouncer-pgbouncer-410@github.com> (raw)

I have configured pgbouncer 1.9.0 accordingly in Debian (short version):
```
[databases]
db1 = db1.myhost.com

[users]
user2 = pool_mode=session

[pgbouncer]
auth_type = md5
auth_file = /etc/pgbouncer/userlist.txt
auth_user = pgbouncer
auth_query = SELECT p_user, p_password FROM public.pgbouncer_lookup($1)

pool_mode = transaction
```

When I connect using `user1` then everything is working as expected, but when I connect using `user2` the custom `pool_mode=session` is not applied as defined in `[users]` section.

Also seems like I need to add `auth_user=pgbouncer` in users section as well to get it working.

Did some more digging as well:

1) I set pool_mode=session auth_user=pgbouncer in [users] section => I can log in, but default pool_mode=transaction will be used and authenticated using auth_query
2) I set pool_mode=session in [users] section and configure user in auth_file => pool_mode=session would be used and authenticated from auth_file
3) I set pool_mode=session auth_user=pgbouncer in [users] section + configure user in auth_file => I can log in, but default pool_mode=transaction will be used and auth_query will be used for authentication

view thread (4+ messages)  latest in thread

Message-ID: <gh-pgbouncer-pgbouncer-410@github.com>
Permalink:  ../gh-pgbouncer-pgbouncer-410@github.com/

 · 


This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox