Re: GUC for temporarily disabling event triggers

Поиск
Список
Период
Сортировка
От Justin Pryzby
Тема Re: GUC for temporarily disabling event triggers
Дата
Msg-id ZCncJGbFLex2f9GP@telsasoft.com
обсуждение исходный текст
Ответ на Re: GUC for temporarily disabling event triggers  (Daniel Gustafsson <daniel@yesql.se>)
Ответы Re: GUC for temporarily disabling event triggers  (Daniel Gustafsson <daniel@yesql.se>)
Список pgsql-hackers
On Mon, Mar 06, 2023 at 01:24:56PM +0100, Daniel Gustafsson wrote:
> > On 27 Jan 2023, at 15:00, Mikhail Gribkov <youzhick@gmail.com> wrote:
> 
> > There is a complete framework for disabling various types of the event triggers separately, but, the list of valid
GUCvalues only include 'all' and 'none'. Why not adding support for all the event trigger types separately? Everything
isalready there in the patch; the only thing needed is expanding couple of enums. It's cheap in terms of code size and
evencheaper in terms of performance. And moreover - it would be a good example for anyone adding new trigger types.
 
> 
> I can't exactly recall my reasoning, but I do think you're right that if we're
> to have this GUC it should support the types of existing EVTs.  The updated v4
> implements that as well as a rebase on top of master and fixing a typo
> discovered upthread.
> 
+                       gettext_noop("Disable event triggers for the duration of the session."),

Why does is it say "for the duration of the session" ?

It's possible to disable ignoring, and within the same session.
GUCs are typically "for the duration of the session" .. but they don't
say so (and don't need to).

+                       elog(ERROR, "unsupport event trigger: %d", event);

typo: unsupported

+        Allows to temporarily disable event triggers from executing in order

=> Allow temporarily disabling execution of event triggers ..

+        to troubleshoot and repair faulty event triggers. The value matches
+        the type of event trigger to be ignored:
+        <literal>ddl_command_start</literal>, <literal>ddl_command_end</literal>,
+        <literal>table_rewrite</literal> and <literal>sql_drop</literal>.
+        Additionally, all event triggers can be disabled by setting it to
+        <literal>all</literal>. Setting the value to <literal>none</literal>
+        will ensure that all event triggers are enabled, this is the default

It doesn't technically "ensure that they're enabled", since they can be
disabled by ALTER.  Better to say that it "doesn't disable any even triggers".

-- 
Justin



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

Предыдущее
От: Nathan Bossart
Дата:
Сообщение: Re: O(n) tasks cause lengthy startups and checkpoints
Следующее
От: Nathan Bossart
Дата:
Сообщение: Re: O(n) tasks cause lengthy startups and checkpoints