On 2020-12-23 15:33, Simon Riggs wrote:
Poolers such as pgbouncer would then be able to connect transaction mode pools by setting transaction_cleanup=on at time of connection, avoiding any need to issue a server_reset_query, removing the DISCARD ALL command from the normal execution path, while still achieving the same thing.
PgBouncer does not send DISCARD ALL in transaction mode. There is a separate setting to do that, but it's not the default, and it's more of a workaround for bad client code. So I don't know if this feature would be of much use for PgBouncer. Other connection poolers might have other opinions.