Re: Rule recompilation

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Rule recompilation
Дата
Msg-id 11823.994966768@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Rule recompilation  (Jan Wieck <JanWieck@Yahoo.com>)
Список 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 по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Re: Strangeness in xid allocation / snapshot setup
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Rule recompilation