Re: Rule recompilation

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Jan Wieck <JanWieck(at)yahoo(dot)com>
Cc: PostgreSQL HACKERS <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Rule recompilation
Date: 2001-07-12 19:39:28
Message-ID: 11823.994966768@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Jan Wieck <JanWieck(at)yahoo(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2001-07-12 19:46:04 Re: Rule recompilation
Previous Message Tom Lane 2001-07-12 19:33:08 Re: Rule recompilation