Created
October 22, 2018 02:26
-
-
Save ailabs-software/ff7a32a40d008d0fc665ea56d1636004 to your computer and use it in GitHub Desktop.
Connections being given out for wrong Postgres user!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I have configured two connections in pgbouncer.ini as separate databases, so that I may have different users with different settings (such as statement timeout being more harsh): | |
default_pool = dbname=elladb pool_size=70 | |
analytics_pool = dbname=elladb user=analytics password=lorderulesz pool_size=10 | |
pool_mode = transaction | |
My question is, with these settings, is it possible for a connection from analytics_pool to be given to a client requesting default_pool? | |
This is what my application is occasionally experiencing, I know because code which uses default_pool ran under analytics_pool and then failed because user analytics doesn't have same permission. | |
Here is the normal connnection string, which resulted in getting analytics: | |
"postgres://postgres:1234@localhost:6432/default_pool" | |
Here is the connection string for analytics: | |
postgres://postgres:1234@localhost:6432/analytics_pool | |
What would cause PgBouncer to pass an analytics-connected connection to a client requesting the default pool? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment