On Fri, Jan 02, 2004 at 12:21:22PM -0500, Tom Lane wrote: > Jan Wieck <[EMAIL PROTECTED]> 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 <[EMAIL PROTECTED]> http://home.zf.jcu.cz/~zakkr/ ---------------------------(end of broadcast)--------------------------- TIP 6: Have you searched our list archives? http://archives.postgresql.org