diff options
-rw-r--r-- | sql/pgq/triggers/common.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sql/pgq/triggers/common.c b/sql/pgq/triggers/common.c index 20e47395..fc3c3b32 100644 --- a/sql/pgq/triggers/common.c +++ b/sql/pgq/triggers/common.c @@ -528,7 +528,11 @@ bool pgqtriga_is_pkey(PgqTriggerEvent *ev, TriggerData *tg, int i, int attkind_i bool pgq_is_logging_disabled(void) { #if defined(PG_VERSION_NUM) && PG_VERSION_NUM >= 80300 - if (SessionReplicationRole != SESSION_REPLICATION_ROLE_ORIGIN) + /* + * Force-disable the trigger in local replication role. In other + * roles rely on the enabled/disabled status of the trigger. + */ + if (SessionReplicationRole == SESSION_REPLICATION_ROLE_LOCAL) return true; #endif return false; |