Re: invalidating cached plans

Neil Conway <neilc@samurai.com>

From: Neil Conway <neilc@samurai.com>
To: Bruce Momjian <pgman@candle.pha.pa.us>
Cc: hf1122x@protecting.net, pgsql-hackers@postgresql.org
Date: 2005-03-15T01:24:40Z
Lists: pgsql-hackers
Bruce Momjian wrote:
> One idea would be to record if the function uses non-temp tables, temp
> tables, or both, and invalidate based on the type of table being
> invalidated, rather than the table name itself.  I can imagine this
> hurting temp table caching, but at least functions using regular tables
> would not be affected, and functions using temp tables would work
> reliably.

It seems to me it's not _that_ difficult to invalidate plans at a more 
granular level (based on the individual database objects they depend 
upon). Inlined functions need to be handled, but that is doable -- it 
just needs some work. The efficiency win of not needlessly throwing away 
cached plans is worth investing some effort, I think.

-Neil