summaryrefslogtreecommitdiff
path: root/doc/src
diff options
context:
space:
mode:
authorAmit Kapila <akapila@postgresql.org>2023-06-22 12:35:10 +0530
committerAmit Kapila <akapila@postgresql.org>2023-06-22 12:35:10 +0530
commit8aac6140c8ac44fe34ad8242e37d8f94e0156c49 (patch)
tree37f73ec80a861d4c44bbc2702dbcd1c6a3e19c47 /doc/src
parent4e17cb00dc2b57f0ac1bbe3c1fd587e982b33307 (diff)
Doc: Clarify the behavior of triggers/rules in a logical subscriber.
By default, triggers and rules do not fire on a logical replication subscriber based on the "session_replication_role" GUC being set to "replica". However, the docs in the logical replication section assumed that the reader understood how this GUC worked. This modifies the docs to be more explicit and links back to the GUC itself. Author: Jonathan Katz, Peter Smith Reviewed-by: Vignesh C, Euler Taveira Backpatch-through: 11 Discussion: https://postgr.es/m/5bb2c9a2-499f-e1a2-6e33-5ce96b35cc4a@postgresql.org
Diffstat (limited to 'doc/src')
-rw-r--r--doc/src/sgml/logical-replication.sgml10
1 files changed, 7 insertions, 3 deletions
diff --git a/doc/src/sgml/logical-replication.sgml b/doc/src/sgml/logical-replication.sgml
index dd0bde23cee..bc3f5ec78d0 100644
--- a/doc/src/sgml/logical-replication.sgml
+++ b/doc/src/sgml/logical-replication.sgml
@@ -1462,9 +1462,13 @@ CONTEXT: processing remote data for replication origin "pg_16395" during "INSER
<para>
The apply process on the subscriber database always runs with
- <varname>session_replication_role</varname> set
- to <literal>replica</literal>, which produces the usual effects on triggers
- and constraints.
+ <link linkend="guc-session-replication-role"><varname>session_replication_role</varname></link>
+ set to <literal>replica</literal>. This means that, by default,
+ triggers and rules will not fire on a subscriber. Users can optionally choose to
+ enable triggers and rules on a table using the
+ <link linkend="sql-altertable"><command>ALTER TABLE</command></link> command
+ and the <literal>ENABLE TRIGGER</literal> and <literal>ENABLE RULE</literal>
+ clauses.
</para>
<para>