Skip to content

Commit ff87fab

Browse files
committed
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
1 parent 2e619f8 commit ff87fab

File tree

1 file changed

+2
-14
lines changed

1 file changed

+2
-14
lines changed

src/backend/commands/event_trigger.c

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -833,20 +833,8 @@ EventTriggerTableRewrite(Node *parsetree, Oid tableOid, int reason)
833833
EventTriggerData trigdata;
834834

835835
/*
836-
* Event Triggers are completely disabled in standalone mode. There are
837-
* (at least) two reasons for this:
838-
*
839-
* 1. A sufficiently broken event trigger might not only render the
840-
* database unusable, but prevent disabling itself to fix the situation.
841-
* In this scenario, restarting in standalone mode provides an escape
842-
* hatch.
843-
*
844-
* 2. BuildEventTriggerCache relies on systable_beginscan_ordered, and
845-
* therefore will malfunction if pg_event_trigger's indexes are damaged.
846-
* To allow recovery from a damaged index, we need some operating mode
847-
* wherein event triggers are disabled. (Or we could implement
848-
* heapscan-and-sort logic for that case, but having disaster recovery
849-
* scenarios depend on code that's otherwise untested isn't appetizing.)
836+
* See EventTriggerDDLCommandStart for a discussion about why event
837+
* triggers are disabled in single user mode.
850838
*/
851839
if (!IsUnderPostmaster)
852840
return;

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy