From: | Gurjeet Singh <singh(dot)gurjeet(at)gmail(dot)com> |
---|---|
To: | PGSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | A table for ALTER TABLE .. ENABLE TRIGGER combining session_replication_role GUC |
Date: | 2012-05-21 18:10:38 |
Message-ID: | CABwTF4Uu2fhxBm7bZSDK_LtSwYGE_d88J3-YWwt8KZxsEn+EyQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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
From | Date | Subject | |
---|---|---|---|
Next Message | Josh Berkus | 2012-05-21 18:11:42 | Re: 9.2 Beta: intersection of daterange |
Previous Message | Josh Berkus | 2012-05-21 18:10:09 | Re: Draft release notes complete |