From 4356cb00e224a744179d7555138e43fe41e0d6fe Mon Sep 17 00:00:00 2001 From: Martin Pihlak Date: Fri, 27 Nov 2009 11:34:23 +0200 Subject: [PATCH] pgq.sqltriga/pgq.logutriga now fire in origin and replica roles. This allows 'ENABLE ALWAYS' and 'ENABLE REPLICA' triggers to fire on the target side. Previous behaviour was to only fire in origin role. --- sql/pgq/triggers/common.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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; -- 2.39.5