Re: When deleting the plpgsql function, release the CachedPlan of the function - Mailing list pgsql-hackers

From Vladlen Popolitov
Subject Re: When deleting the plpgsql function, release the CachedPlan of the function
Date
Msg-id e6686f7105847c538613f4bf81dc61c3@postgrespro.ru
Whole thread Raw
In response to Re: When deleting the plpgsql function, release the CachedPlan of the function  (Man Zeng <zengman@halodbtech.com>)
Responses Re: When deleting the plpgsql function, release the CachedPlan of the function
Re: When deleting the plpgsql function, release the CachedPlan of the function
List pgsql-hackers
Man Zeng писал(а) 2025-08-19 10:50:
> https://www.postgresql.org/message-id/flat/tencent_0BA97862026BC74E75238899@qq.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.



pgsql-hackers by date:

Previous
From: Man Zeng
Date:
Subject: Re: When deleting the plpgsql function, release the CachedPlan of the function
Next
From: Bertrand Drouvot
Date:
Subject: Re: Improve LWLock tranche name visibility across backends