Re: Rule recompilation - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Rule recompilation
Date
Msg-id 11793.994966388@sss.pgh.pa.us
Whole thread Raw
In response to Re: Rule recompilation  (Jan Wieck <JanWieck@Yahoo.com>)
Responses Re: Rule recompilation
List pgsql-hackers
Jan Wieck <JanWieck@yahoo.com> writes:
>     Stop!
>     We're talking about two different things here.

You're right: fixing obsoleted querytrees stored in pg_rewrite and
similar catalogs is not the same thing as invalidating cached
query plans in plpgsql, SPI, etc.

However, we could turn them into the same problem if we rearrange the
catalogs to store only source text.  Then there's no need to update any
permanent state, only a need to cause invalidation of derived state
inside various backends.

Each piece of derived state could (and should IMHO) be tagged with a
list of all the objects it depends on; then an invalidation message for
any of those objects would cause that piece of state to be thrown away
and rebuilt at next use.  Just like the catalog caches ...
        regards, tom lane


pgsql-hackers by date:

Previous
From: Jan Wieck
Date:
Subject: Re: Rule recompilation
Next
From: Peter Eisentraut
Date:
Subject: Re: Rule recompilation