<div dir="ltr">A while ago I created this table to easily understand which kind of trigger gets executed under what
settingof session_replication_role. There's already a description in the docs which describes it:<br /><br
/><quote><br/> Simply enabled triggers will fire when the replication role is <span class="QUOTE">"origin"</span>
(thedefault) or <span class="QUOTE">"local"</span>. Triggers configured as <tt class="LITERAL">ENABLE REPLICA</tt> will
onlyfire if the session is in <span class="QUOTE">"replica"</span> mode, and triggers configured as <tt
class="LITERAL">ENABLEALWAYS</tt> will fire regardless of the current replication mode.<br /></quote><br /><br
/>Iwas wondering if this table would add value for anyone looking at those statements and trying to develop a similar
tablein their heads.<br /><br /><span style="font-family:courier new,monospace">
+--------------------------+</span><brstyle="font-family:courier new,monospace" /><span style="font-family:courier
new,monospace"> | session_replication_role |</span><br style="font-family:courier new,monospace"
/><spanstyle="font-family:courier new,monospace">+------------------------+--------+---------+-------+</span><br
style="font-family:couriernew,monospace" /><span style="font-family:courier new,monospace">| ALTER TABLE Command |
origin| replica | local |</span><br style="font-family:courier new,monospace" /><span style="font-family:courier
new,monospace">+------------------------+--------+---------+-------+</span><brstyle="font-family:courier new,monospace"
/><spanstyle="font-family:courier new,monospace">| ENABLE TRIGGER | x | | x |</span><br
style="font-family:couriernew,monospace" /><span style="font-family:courier new,monospace">| ENABLE REPLICA
</span><spanstyle="font-family:courier new,monospace">TRIGGER</span><span style="font-family:courier new,monospace">
| | x | |</span><br style="font-family:courier new,monospace" /><span style="font-family:courier
new,monospace">|</span><span style="font-family:courier new,monospace">ENABLE ALWAYS</span><span
style="font-family:couriernew,monospace"> </span><span style="font-family:courier new,monospace">TRIGGER</span><span
style="font-family:couriernew,monospace"> | x | x | x |</span><br style="font-family:courier
new,monospace"/><span style="font-family:courier
new,monospace">+------------------------+--------+---------+-------+</span><brstyle="font-family:courier new,monospace"
/><br/>Regards,<br />-- <br /><div dir="ltr">Gurjeet Singh<br />EnterpriseDB Corporation<br /> The Enterprise
PostgreSQLCompany<br /></div><br /></div>