From: | Jan Wieck <JanWieck(at)Yahoo(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | ivan <iv(at)psycho(dot)pl>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: cache in plpgsql |
Date: | 2004-01-02 19:31:58 |
Message-ID: | 3FF5C72E.3030402@Yahoo.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Tom Lane wrote:
> Jan Wieck <JanWieck(at)Yahoo(dot)com> writes:
>> Tom Lane wrote:
>>> Another little problem is that plpgsql doesn't really have any mechanism
>>> for invalidating cached stuff at all; it will leak memory like there's
>>> no tomorrow if we start dropping cached subplans.
>
>> Everyone seems to look at it as a PL/pgSQL specific problem. It is not!
>
> No, of course not, but plpgsql has issues of its own that (IMHO) should
> be solved along with the SPI-level problem.
Not sure what you mean by that. Is it the execution plan shortcut stuff
for simple expressions (you know, the faked econtext to evaluate just a
function call) that you want to move into SPI as well?
>
>> As said, the idea is neither bad, nor new. And please let's not forget
>> to add temp object detection into the dependency collector so that SPI
>> automagically will handle temp tables used in PL/pgSQL by NOT storing
>> prepared plans at all.
>
> Why shouldn't we cache plans for temp tables? They are good as long as
> the temp table exists. AFAICS the same dependency mechanism will work
> fine for temp and regular tables.
Good point. So you mean to call the SPI functionality to mark plans for
recompile at temp object destruction as well.
Jan
--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#================================================== JanWieck(at)Yahoo(dot)com #
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2004-01-02 20:45:21 | Re: cache in plpgsql |
Previous Message | julius | 2004-01-02 18:26:55 | postgresql-7.4 make error: tuptoaster.c: In function `toast_delete_datum' |