From: Tom Lane <tgl@sss.pgh.pa.us>
To: Jan Wieck <JanWieck@Yahoo.com>
Cc: ivan <iv@psycho.pl>
Cc: pgsql-hackers@postgresql.org
Subject: Re: cache in plpgsql
Date: Fri, 02 Jan 2004 15:45:21 -0500
Message-ID: <14937.1073076321@sss.pgh.pa.us> (raw)
In-Reply-To: <3FF5C72E.3030402@Yahoo.com>
References: <Pine.LNX.4.56.0312302329590.5131@rex.anfa.pl>
<3FF2C608.3090906@Yahoo.com>
<Pine.LNX.4.56.0312311417500.20780@rex.anfa.pl>
<3FF2CFE0.70804@Yahoo.com>
<Pine.LNX.4.56.0401011655420.13912@rex.anfa.pl>
<3FF4DC86.1000400@Yahoo.com>
<2714.1073013920@sss.pgh.pa.us>
<3FF59802.4020607@Yahoo.com>
<7004.1073064082@sss.pgh.pa.us>
<3FF5C72E.3030402@Yahoo.com>
Jan Wieck <JanWieck@Yahoo.com> writes:
> Tom Lane wrote:
>> 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.
I'm referring to the fact that plpgsql's internal data structures are
all built with malloc and cannot be effectively reclaimed when the
function definition is invalidated. I'd also like to get rid of its
ad-hoc method of detecting function definition changes (viz, looking
at the pg_proc row's xmin) in favor of hooking it into the same cache
invalidation mechanism as SPI would be using.
These are perhaps not essential changes, but they should happen
eventually.
>> 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.
I think it would be difficult to avoid. Temp objects are not very magic
in themselves, they just live in particular schemas that happen to be a
little bit magic.
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: tgl@sss.pgh.pa.us, JanWieck@Yahoo.com, iv@psycho.pl
Subject: Re: cache in plpgsql
In-Reply-To: <14937.1073076321@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox