-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
pgbouncers break postgres connection settings #4473
Comments
We should either avoid depending on these settings, or, if we really can't help it, figure out how to replicate the settings in pgbouncer and document it. (It would be really nice to avoid setting |
Problem can be quickly solved by adding to
|
If the pgbouncer is used for synapses only this should not be a problem, should it? |
Case in point we have switched to synapse with a few workers, and this causes a lot of idle connections most of the time, which could probably be handled by pgbouncer? |
to update this slightly: #4475 is now fixed, so we no longer rely on the I'm not really sure how much this matters in practice. @erikjohnston any thoughts on that? |
I don't know where and how we rely on I'd have thought that there must be some way to get pgbouncer to respect isolation levels? Or maybe we can get psycopg2 to explicitly set the transcation level when it sends a |
I believe That said, I very much feel like the right solution is for us to Maybe we could do this with an option to |
opened #11567 to track this |
Given that connection-level settings for the isolation level are actually emulated within psycopg (https://github.com/psycopg/psycopg2/blob/8ef195f2ff187454cc709d7857235676bb4176ee/psycopg/pqpath.c#L372), I actually don't think it's correct that pgbouncers do break the isolation level setting. I'm going to close this pending evidence. |
we carefully set up the transaction isolation level and bytea encoding for each connection to postgres, but of course pgbouncer can open new connections which don't get these settings, which can cause breakage such as incorrectly-encoded json being stored in the database
The text was updated successfully, but these errors were encountered: