Re: Discarding DISCARD ALL

Peter Eisentraut <peter.eisentraut@enterprisedb.com>

From: Peter Eisentraut <peter.eisentraut@enterprisedb.com>
To: Simon Riggs <simon@2ndquadrant.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2021-01-20T07:48:15Z
Lists: pgsql-hackers
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.