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

zengman <zengman@halodbtech.com>

From: zengman <zengman@halodbtech.com>
To: pgsql-hackers <pgsql-hackers@lists.postgresql.org>
Date: 2025-08-19T07:45:07Z
Lists: pgsql-hackers

Attachments

This patch only addresses the plan cache release for plpgsql (the procedural language) and does not cover SQL functions.

Since the src/backend/utils/cache/funccache.c file was introduced in PostgreSQL 18, I will first upgrade to version 18,&nbsp;
then figure out how to extend the benefit to SQL functions.&nbsp;
Additionally, I’m not entirely certain whether this patch’s modification is reasonable, or if it could lead to performance degradation.&nbsp;
I might need everyone’s help to review it.