This allows 'ENABLE ALWAYS' and 'ENABLE REPLICA' triggers to
fire on the target side. Previous behaviour was to only fire in
origin role.
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;