Wow this is very bad. This actually happens in typical Postgres setups?
in pgbouncer the connection is reset via a customisable command [0] which should reset the connection to a clean state.
[0] https://www.pgbouncer.org/config.html#server_reset_query
mmakeev•1h ago