Attempt to clear the compilation warning, overwrite the plpgsql.out file, and
update the patch.
002_cleanup_spl_funccache_v2.patch
Description: Binary data
It seems not an easy task. And here is my new work of such task.
The main idea is register a sys cache callback in cached_function_compile
when not registered. So it will effect for all SPL.
And also introduce a new hash table to track the function for cache inval
callback. The procedure in callbac
Vladlen Popolitov writes:
> What do you mean, when speak about function cache?
What I'm thinking about is the function parse-tree, which not
incidentally contains a bunch of links to cached plans (via SPI).
Looking at plpgsql_free_function_memory might clarify things
for you.
章晨曦 писал(а) 2025-08-19 12:31:
I think you misunderstand Man's meaning. In Man's example, the func
cache
neither dropped (will cause memory leak) nor reused. So the question
here:
1. Drop the cache when func dropped
2. Keep the cache and reused when func recreate
I prefer the 2ed solution.
Re
"=?utf-8?B?56ug5pmo5pum?=" writes:
> I think you misunderstand Man's meaning. In Man's example, the func cache
> neither dropped (will cause memory leak) nor reused. So the question here:
> 1. Drop the cache when func dropped
> 2. Keep the cache and reused when func recreate
> I prefer the 2ed sol
Vladlen Popolitov 2025-08-19 08:39:50 wrote:> Hi!
>
> In your example function will be compiled (the tree is created in
the
> memory)
> and executed.
> During execution this function creates a plan for very simple query
1
> and stores it in the cache, than it creates a plan for query 10 and
>
Man Zeng писал(а) 2025-08-19 11:28:
So in my opinion, the cached plan will not be reused but will
constantly occupy resources.
regards,
Zeng Man
Hi!
In your example function will be compiled (the tree is created in the
memory)
and executed.
During execution this function creates a plan fo
So in my opinion, the cached plan will not be reused but will constantly occupy
resources.
regards,
Zeng Man
When a function or stored procedure is created, called, and then dropped,
the resulting CachedPlan is never released and can only be freed by exiting the
session.
Meanwhile, if you create another function or stored procedure with the same
name and parameters, and then call it,
you'll be able t
Man Zeng писал(а) 2025-08-19 10:50:
https://www.postgresql.org/message-id/flat/tencent_0ba97862026bc74e75238...@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 pro
https://www.postgresql.org/message-id/flat/tencent_0ba97862026bc74e75238...@qq.com
The new status of this patch is: Needs review
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,
then figure out how to extend the benefit to SQL funct
That's correct—this is a simple and blunt patch, and it fails to account for
many factors. Initially, I wasn't even sure if this qualified as a distinct
issue. Your solution is far more reasonable, and I will rethink the new
implementation thoroughly based on your approach.
Thanks,
Zeng Man
Th
That's correct??this is a simple and blunt patch, and it fails to account for
many factors. Initially, I wasn't even sure if this qualified as a distinct
issue. Your solution is far more reasonable, and I will rethink the new
implementation thoroughly based on your approach.
Thanks,
Zeng Man
Matthias van de Meent writes:
> I'm trying to figure out how this patch is supposed to handle
> concurrent sessions dropping a procedure that has cached plans.
It doesn't, which is (one reason) why it's just a crude hack.
A more appropriate solution would be to make plpgsql install
a shared-cach
On Mon, 18 Aug 2025 at 08:51, zengman 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 h
Sorry for the garbled characters. I am resending the original test results as
an attachment.
case.txt
Description: Binary data
Sorry for the garbled characters. I am resending the original test results as
an attachment.
result.pdf
Description: Binary data
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.
A simple test case is as follows:
Step 1 ??
create or replace procedure test_pr
19 matches
Mail list logo