Re: question about the _SPI_save_plan() and plan cache - Mailing list pgsql-hackers

From Tao Ma
Subject Re: question about the _SPI_save_plan() and plan cache
Date
Msg-id h4n76e$298q$1@news.hub.org
Whole thread Raw
In response to question about the _SPI_save_plan() and plan cache  ("Tao Ma" <feng_eden@163.com>)
Responses Re: question about the _SPI_save_plan() and plan cache
List pgsql-hackers
I knew that the delete_function() will reclaim the memory context
allocated for the function. But I did not find any code for removing
the plan(SPI plan memory context), saved by calling _SPI_save_plan.

Is the plan memory context freed when someone issued CREATE OR
REPLACE FUNCTION?

Thanks.

"Tom Lane" <tgl@sss.pgh.pa.us> wrotes:25310.1248791701@sss.pgh.pa.us...
> "Tao Ma" <feng_eden@163.com> writes:
>> Once we DROP the function, the memory consumed
>> by the plan will be leak.
>
> I'm pretty unconcerned about DROP FUNCTION.  The case that seems worth
> worrying about is CREATE OR REPLACE FUNCTION, and in that case we'll
> reclaim the storage on the next call of the function.
>
> regards, tom lane
>
> -- 
> Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-hackers
> 




pgsql-hackers by date:

Previous
From: "Kevin Grittner"
Date:
Subject: Re: Higher TOAST compression.
Next
From: Robert Haas
Date:
Subject: Re: WIP: to_char, support for EEEE format