From: Karel Zak <zakkr@zf.jcu.cz>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Jan Wieck <JanWieck@Yahoo.com>
Cc: ivan <iv@psycho.pl>
Cc: pgsql-hackers@postgresql.org
Subject: Re: cache in plpgsql
Date: Mon, 5 Jan 2004 10:13:12 +0100
Message-ID: <20040105091311.GC13231@zf.jcu.cz> (raw)
In-Reply-To: <7004.1073064082@sss.pgh.pa.us>
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>
On Fri, Jan 02, 2004 at 12:21:22PM -0500, Tom Lane wrote:
> Jan Wieck <JanWieck@Yahoo.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.
My original PREPARE/EXECUTE patch contained SPI_saveplan() version that
save plan to query cache. I think it's pretty bad idea use for same
things more separate solutions. For example see RI stuff (triggeres) --
it's perfect adept for PREPARE/EXECUTE query cache instead the current
RI solution that save plans in own hash table. I think we can add
support for work with query cache to SPI and use it in more places (RI,
PL, etc.), something like SPI_saveplan_bykey().
Karel
--
Karel Zak <zakkr@zf.jcu.cz>
http://home.zf.jcu.cz/~zakkr/
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: zakkr@zf.jcu.cz, tgl@sss.pgh.pa.us, JanWieck@Yahoo.com, iv@psycho.pl
Subject: Re: cache in plpgsql
In-Reply-To: <20040105091311.GC13231@zf.jcu.cz>
* 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