summaryrefslogtreecommitdiff
path: root/doc/src/sgml
diff options
context:
space:
mode:
authorDaniel Gustafsson <dgustafsson@postgresql.org>2023-09-25 12:41:49 +0200
committerDaniel Gustafsson <dgustafsson@postgresql.org>2023-09-25 12:41:49 +0200
commit7750fefdb2b81e0ee09c523d0a21cbd37edaf4b2 (patch)
tree6e1973a44ffbf5a5ebd91906078ec8bc89d2dc98 /doc/src/sgml
parentf19669fed3efe872425c80d4b1f45bf59267b7ea (diff)
Add GUC for temporarily disabling event triggers
In order to troubleshoot misbehaving or buggy event triggers, the documented advice is to enter single-user mode. In an attempt to reduce the number of situations where single-user mode is required (or even recommended) for non-extraordinary maintenance, this GUC allows to temporarily suspend event triggers. This was originally extracted from a larger patchset which aimed at supporting event triggers on login events. Reviewed-by: Ted Yu <yuzhihong@gmail.com> Reviewed-by: Mikhail Gribkov <youzhick@gmail.com> Reviewed-by: Justin Pryzby <pryzby@telsasoft.com> Reviewed-by: Michael Paquier <michael@paquier.xyz Reviewed-by: Robert Haas <robertmhaas@gmail.com> Discussion: https://postgr.es/m/9140106E-F9BF-4D85-8FC8-F2D3C094A6D9@yesql.se Discussion: https://postgr.es/m/0d46d29f-4558-3af9-9c85-7774e14a7709@postgrespro.ru
Diffstat (limited to 'doc/src/sgml')
-rw-r--r--doc/src/sgml/config.sgml19
-rw-r--r--doc/src/sgml/ref/create_event_trigger.sgml9
2 files changed, 25 insertions, 3 deletions
diff --git a/doc/src/sgml/config.sgml b/doc/src/sgml/config.sgml
index 6bc1b215db9..d42b7d63ee6 100644
--- a/doc/src/sgml/config.sgml
+++ b/doc/src/sgml/config.sgml
@@ -9425,6 +9425,25 @@ SET XML OPTION { DOCUMENT | CONTENT };
</listitem>
</varlistentry>
+ <varlistentry id="guc-event-triggers" xreflabel="event_triggers">
+ <term><varname>event_triggers</varname> (<type>boolean</type>)
+ <indexterm>
+ <primary><varname>event_triggers</varname></primary>
+ <secondary>configuration parameter</secondary>
+ </indexterm>
+ </term>
+ <listitem>
+ <para>
+ Allow temporarily disabling execution of event triggers in order to
+ troubleshoot and repair faulty event triggers. All event triggers will
+ be disabled by setting it to <literal>false</literal>. Setting the value
+ to <literal>true</literal> allows all event triggers to fire, this
+ is the default value. Only superusers and users with the appropriate
+ <literal>SET</literal> privilege can change this setting.
+ </para>
+ </listitem>
+ </varlistentry>
+
</variablelist>
</sect2>
<sect2 id="runtime-config-client-format">
diff --git a/doc/src/sgml/ref/create_event_trigger.sgml b/doc/src/sgml/ref/create_event_trigger.sgml
index 22c81191982..ef12cfa20d4 100644
--- a/doc/src/sgml/ref/create_event_trigger.sgml
+++ b/doc/src/sgml/ref/create_event_trigger.sgml
@@ -121,9 +121,12 @@ CREATE EVENT TRIGGER <replaceable class="parameter">name</replaceable>
<para>
Event triggers are disabled in single-user mode (see <xref
- linkend="app-postgres"/>). If an erroneous event trigger disables the
- database so much that you can't even drop the trigger, restart in
- single-user mode and you'll be able to do that.
+ linkend="app-postgres"/>) as well as when
+ <xref linkend="guc-event-triggers"/> is set to <literal>false</literal>.
+ If an erroneous event trigger disables the database so much that you can't
+ even drop the trigger, restart with <xref linkend="guc-event-triggers"/>
+ set to <literal>false</literal> to temporarily disable event triggers, or
+ in single-user mode, and you'll be able to do that.
</para>
</refsect1>