A table for ALTER TABLE .. ENABLE TRIGGER combining session_replication_role GUC - Mailing list pgsql-hackers

From Gurjeet Singh
Subject A table for ALTER TABLE .. ENABLE TRIGGER combining session_replication_role GUC
Date
Msg-id CABwTF4Uu2fhxBm7bZSDK_LtSwYGE_d88J3-YWwt8KZxsEn+EyQ@mail.gmail.com
Whole thread
List pgsql-hackers
A while ago I created this table to easily understand which kind of trigger gets executed under what setting of session_replication_role. There's already a description in the docs which describes it:

<quote>
Simply enabled triggers will fire when the replication role is "origin" (the default) or "local". Triggers configured as ENABLE REPLICA will only fire if the session is in "replica" mode, and triggers configured as ENABLE ALWAYS will fire regardless of the current replication mode.
</quote>

I was wondering if this table would add value for anyone looking at those statements and trying to develop a similar table in their heads.

                         +--------------------------+
                         | session_replication_role |
+------------------------+--------+---------+-------+
| ALTER TABLE Command    | origin | replica | local |
+------------------------+--------+---------+-------+
| ENABLE         TRIGGER |   x    |         |   x   |
| ENABLE REPLICA TRIGGER |        |    x    |       |
| ENABLE ALWAYS  TRIGGER |   x    |    x    |   x   |
+------------------------+--------+---------+-------+

Regards,
--
Gurjeet Singh
EnterpriseDB Corporation
The Enterprise PostgreSQL Company

pgsql-hackers by date:

Previous
From: Josh Berkus
Date:
Subject: Re: Draft release notes complete
Next
From: Josh Berkus
Date:
Subject: Re: 9.2 Beta: intersection of daterange