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

From: zengman <zengman(at)halodbtech(dot)com>
To: 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-19 07:45:07
Message-ID: tencent_0BA97862026BC74E75238899@qq.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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.

Attachment Content-Type Size
00002_free_plpgsql_function_memory.patch application/octet-stream 2.5 KB

Browse pgsql-hackers by date

  From Date Subject
Next Message Hannu Krosing 2025-08-19 07:49:26 Re: pg_upgrade: transfer pg_largeobject_metadata's files when possible
Previous Message John Naylor 2025-08-19 07:31:27 Re: New commitfest app release on August 19th