Re: GUC for temporarily disabling event triggers
Daniel Gustafsson <daniel@yesql.se>
From: Daniel Gustafsson <daniel@yesql.se>
To: Justin Pryzby <pryzby@telsasoft.com>
Cc: Mikhail Gribkov <youzhick@gmail.com>,
pgsql-hackers@lists.postgresql.org
Date: 2023-04-03T12:45:53Z
Lists: pgsql-hackers
Attachments
- v5-0001-Add-GUC-for-temporarily-disabling-event-triggers.patch (application/octet-stream) patch v5-0001
- (unnamed) (text/plain)
> On 2 Apr 2023, at 21:48, Justin Pryzby <pryzby@telsasoft.com> wrote:
> + 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".
All comments above addressed in the attached v5, thanks for review!
--
Daniel Gustafsson
Commits
-
Add GUC for temporarily disabling event triggers
- 7750fefdb2b8 17.0 landed
-
Fix typos in code and comments
- 5f6401f81cb2 16.0 cited