Re: Rule recompilation

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Rule recompilation
Дата
Msg-id 11596.994963838@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Rule recompilation  (Jan Wieck <JanWieck@Yahoo.com>)
Список pgsql-hackers
Jan Wieck <JanWieck@Yahoo.com> writes:
>     There is of course a difference between the original
>     CREATE  RULE/VIEW  statement and the string stored here. This
>     is because we cannot rely on the actual query buffer but have
>     to parseback the parsetree like done by the utility functions
>     used for pg_rules.

Did you see my comments about extending the parser to make it possible
to extract the appropriate part of the query buffer?  This would allow
us to get rid of the reverse-lister (ruleutils.c) entirely, not to
mention readfuncs.c (but we'd still want outfuncs.c for debugging, I
suppose).

>     Anyway,  what's  the preferred syntax for triggering the rule
>     recompilation?  I thought about
>         ALTER RULE {rulename|ALL} RECOMPILE;
>     Where ALL triggers only those rules where the  user  actually
>     has RULE access right on a relation.

The proposed definition of ALL seems completely off-base.  If I have
changed my table foo, which is referenced by a rule attached to
Joe's table bar, I would like to be able to force recompilation of
Joe's rule.  If I can't do that, a RECOMPILE command is useless.
I might as well just restart my backend.

BTW, a RECOMPILE command that affects only the current backend is pretty
useless anyway.  How are you going to propagate the recompile request to
other backends?
        regards, tom lane


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Jan Wieck
Дата:
Сообщение: Re: Rule recompilation
Следующее
От: Alex Pilosov
Дата:
Сообщение: Re: Rule recompilation