Re: Rule recompilation - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Rule recompilation
Date
Msg-id 11823.994966768@sss.pgh.pa.us
Whole thread Raw
In response to Rule recompilation  (Jan Wieck <JanWieck@Yahoo.com>)
List pgsql-hackers
Jan Wieck <JanWieck@yahoo.com> writes:
>     are  you  sure  that  this  doesn't have a severe performance
>     impact?

It's not provable, of course, until we try it ... but I think the
performance impact would be small.  Has anyone complained about the
fact that plpgsql functions are stored as source not precompiled
trees?  Seems like the same tradeoff.

>     When and how often are  these  parsetrees  read?  IIRC  these
>     parsetree strings are interpreted somehow during heap_open().

Currently we load them during relcache load, but that's only because
little work need be expended to make it happen.  My vision of how
this should work is that the relcache would load the source text
right away, but computation of the derived state would only happen
when someone demands it, and then the relcache would cache the result.
Take a look at how the list of indexes for each relation is handled
in current sources --- same principle, we don't scan pg_index until
and unless we have to.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Re: Strangeness in xid allocation / snapshot setup
Next
From: Tom Lane
Date:
Subject: Re: Rule recompilation