Re: Discarding DISCARD ALL - Mailing list pgsql-hackers

From Andreas Karlsson
Subject Re: Discarding DISCARD ALL
Date
Msg-id 125b1e8a-8b7f-b4b1-19ac-aea0ce15c0a1@proxel.se
Whole thread Raw
In response to Re: Discarding DISCARD ALL  (Simon Riggs <simon@2ndquadrant.com>)
List pgsql-hackers
On 12/23/20 6:49 PM, Simon Riggs wrote:
> The whole premise of the patch is tighter integration, with the server
> providing the facilities that poolers need.

I am all for that. Ideally I would want builtin connection pooling but 
short term I think the way forward is most likely tighter integration.

> The patch can be enhanced to do whatever else we agree is desirable.
> 
> Do we need something like DISCARD ALL EXCEPT PREPARED STATEMENTS;  ??
> 
> If there are different requirements for each pooler, what are they?

If someone adds prepared statement support to e.g. PgBouncer that might 
be a nice feature to have. Plus maybe something like "SET 
transaction_cleanup = 'except_prepared'". But right now I think the 
pools which support prepared statements do not use DISCARD ALL and 
instead just trust the end user to not run SET or use temporary tables 
which outlive transactions.

Andreas



pgsql-hackers by date:

Previous
From: Tatsuo Ishii
Date:
Subject: Re: Implementing Incremental View Maintenance
Next
From: Thomas Munro
Date:
Subject: Re: Cache relation sizes?