aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Paquier <michael@paquier.xyz>2020-05-15 08:19:30 +0900
committerMichael Paquier <michael@paquier.xyz>2020-05-15 08:19:30 +0900
commitff87fabef20ef40c8438e25fe28e9159f874183d (patch)
tree137304915e20e05a5b85f6850b8adf22dea07cb6
parent2e619f86a96c32a710a09a4ff555952746813ba8 (diff)
downloadpostgresql-ff87fabef20ef40c8438e25fe28e9159f874183d.tar.gz
postgresql-ff87fabef20ef40c8438e25fe28e9159f874183d.zip
Remove duplicated comment block in event_trigger.c
The reasons why event triggers are disabled in standalone mode are documented in the code path of ddl_command_start, and other places checking if standalone mode is enabled or not mention to refer to the comment for ddl_command_start, except for table_rewrite that duplicated the same explanation. Reported-by: David G. Johnston Discussion: https://postgr.es/m/CAKFQuwYqHtXpvr2mBJRwH9f+Y5y1GXw3rhbaAu0Dk2MoNevsmA@mail.gmail.com
-rw-r--r--src/backend/commands/event_trigger.c16
1 files changed, 2 insertions, 14 deletions
diff --git a/src/backend/commands/event_trigger.c b/src/backend/commands/event_trigger.c
index 918b9b4d8fa..02ab40eaac7 100644
--- a/src/backend/commands/event_trigger.c
+++ b/src/backend/commands/event_trigger.c
@@ -833,20 +833,8 @@ EventTriggerTableRewrite(Node *parsetree, Oid tableOid, int reason)
EventTriggerData trigdata;
/*
- * Event Triggers are completely disabled in standalone mode. There are
- * (at least) two reasons for this:
- *
- * 1. A sufficiently broken event trigger might not only render the
- * database unusable, but prevent disabling itself to fix the situation.
- * In this scenario, restarting in standalone mode provides an escape
- * hatch.
- *
- * 2. BuildEventTriggerCache relies on systable_beginscan_ordered, and
- * therefore will malfunction if pg_event_trigger's indexes are damaged.
- * To allow recovery from a damaged index, we need some operating mode
- * wherein event triggers are disabled. (Or we could implement
- * heapscan-and-sort logic for that case, but having disaster recovery
- * scenarios depend on code that's otherwise untested isn't appetizing.)
+ * See EventTriggerDDLCommandStart for a discussion about why event
+ * triggers are disabled in single user mode.
*/
if (!IsUnderPostmaster)
return;