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

From: Vladlen Popolitov <v(dot)popolitov(at)postgrespro(dot)ru>
To: Man Zeng <zengman(at)halodbtech(dot)com>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: When deleting the plpgsql function, release the CachedPlan of the function
Date: 2025-08-19 08:01:58
Message-ID: e6686f7105847c538613f4bf81dc61c3@postgrespro.ru
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Man Zeng писал(а) 2025-08-19 10:50:
> https://www.postgresql.org/message-id/flat/tencent_0BA97862026BC74E75238899(at)qq(dot)com
>
> The new status of this patch is: Needs review

Hi!

I read from the beginning till this email and did not
find the description what exactly you are going to fix.
Could you provide more details?

A procedure creates plans and put them to cache for every
SQL query, that it executes (including limits in FOR operator
in your example, that considered as SQL queries). These plans remains
in the cache , when a procedure exits.

These cached plans can be used by this procedure again or can be used by
other procedures or by direct SQL query. It is not clear, why we should
delete them? It is the goal of the cache to use plans in other queries.

--
Best regards,

Vladlen Popolitov.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bertrand Drouvot 2025-08-19 08:09:53 Re: Improve LWLock tranche name visibility across backends
Previous Message Man Zeng 2025-08-19 07:50:20 Re: When deleting the plpgsql function, release the CachedPlan of the function