Re: Patch: New GUC prepared_statement_limit to limit memory used byprepared statements - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: Patch: New GUC prepared_statement_limit to limit memory used byprepared statements
Date
Msg-id 20191128024250.GK237562@paquier.xyz
Whole thread Raw
In response to Re: Patch: New GUC prepared_statement_limit to limit memory used by prepared statements  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Tue, Sep 03, 2019 at 06:30:32PM -0400, Tom Lane wrote:
> Oh ... actually, I bet the problem is that the patch thinks it's okay
> to immediately free space in PlanCacheRelCallback and friends, rather
> than just marking invalid entries as invalid.  Nope, you cannot do that.
> You can't tell whether that data is being examined in an outer call
> level.
>
> In principle I think you could decrement-the-refcount-and-possibly-free
> right away on the gplan, since any outside uses of that ought to have
> their own refcounts.  But the query_context data isn't refcounted.
> Also, some of the failures I saw looked like premature deletion of a
> plan, not query_context data, so the patch seems to be too aggressive
> on that side too.

We are a couple of months after this update, and the patch has not
been updated, so I am marking it as returned with feedack.
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: pglz performance
Next
From: Michael Paquier
Date:
Subject: Re: POC: Cleaning up orphaned files using undo logs