Re: Release SPI plans for referential integrity with DISCARD ALL - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: Release SPI plans for referential integrity with DISCARD ALL
Date
Msg-id 64be401f-30da-3127-beb0-c6f9ccc806a1@enterprisedb.com
Whole thread Raw
In response to Release SPI plans for referential integrity with DISCARD ALL  (yuzuko <yuzukohosoya@gmail.com>)
Responses Re: Release SPI plans for referential integrity with DISCARD ALL  (yuzuko <yuzukohosoya@gmail.com>)
List pgsql-hackers
On 2021-01-13 09:47, yuzuko wrote:
> But we are also considering another option to solve this problem, which
> makes users to release cached SPI plans for referential integrity as well as
> plain cached plans with DISCARD ALL.  To do that, we added a new
> function, RI_DropAllPreparedPlan() which deletes all plans from
> ri_query_cache and
> modified DISCARD ALL to execute that function.

I don't have a comment on the memory management issue, but I think the 
solution of dropping all cached plans as part of DISCARD ALL seems a bit 
too extreme of a solution.  In the context of connection pooling, 
getting a new session with pre-cached plans seems like a good thing, and 
this change could potentially have a performance impact without a 
practical way to opt out.




pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: a misbehavior of partition row movement (?)
Next
From: Michael Paquier
Date:
Subject: Re: Printing LSN made easy