summaryrefslogtreecommitdiff
path: root/src/include/commands/event_trigger.h
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 /src/include/commands/event_trigger.h
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 'src/include/commands/event_trigger.h')
-rw-r--r--src/include/commands/event_trigger.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/include/commands/event_trigger.h b/src/include/commands/event_trigger.h
index 5ed6ece555d..1c925dbf257 100644
--- a/src/include/commands/event_trigger.h
+++ b/src/include/commands/event_trigger.h
@@ -29,6 +29,8 @@ typedef struct EventTriggerData
CommandTag tag;
} EventTriggerData;
+extern PGDLLIMPORT bool event_triggers;
+
#define AT_REWRITE_ALTER_PERSISTENCE 0x01
#define AT_REWRITE_DEFAULT_VAL 0x02
#define AT_REWRITE_COLUMN_REWRITE 0x04