Re: When deleting the plpgsql function, release the CachedPlan of the function

From: Matthias van de Meent <boekewurm+postgres(at)gmail(dot)com>
To: zengman <zengman(at)halodbtech(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: When deleting the plpgsql function, release the CachedPlan of the function
Date: 2025-08-18 16:13:44
Message-ID: CAEze2WgOLDRZr5Bu45iZCmdRPuC0TwFz5+yJRuD6zkz_ak8mRg@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, 18 Aug 2025 at 08:51, zengman <zengman(at)halodbtech(dot)com> wrote:
>
> Hi, hackers
>
> I have observed an issue where the CachedPlan corresponding to a function/procedure is not released when we execute the "DROP FUNCTION\PROCEDURE" command. A patch to resolve this problem is attached.

I'm trying to figure out how this patch is supposed to handle
concurrent sessions dropping a procedure that has cached plans. AFAIK,
we don't execute RemoveFunctionById in other sessions, so this would
still leave the plan caches active for other backends, right?

Kind regards,

Matthias van de Meent
Databricks

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jacob Champion 2025-08-18 16:20:07 Re: Proposal: Extending the PostgreSQL Protocol with Command Metadata
Previous Message Jacob Champion 2025-08-18 16:05:16 Re: Proposal: Extending the PostgreSQL Protocol with Command Metadata