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 thatsave plan to query cache. I think it's pretty
badidea use for samethings more separate solutions. For example see RI stuff (triggeres) --it's perfect adept for
PREPARE/EXECUTE query cache instead the currentRI solution that save plans in own hash table. I think we can
addsupportfor 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/