Skip to content

Commit 991983f

Browse files
author
Amit Kapila
committed
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
1 parent 8145b5e commit 991983f

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

doc/src/sgml/logical-replication.sgml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -465,9 +465,13 @@
465465

466466
<para>
467467
The apply process on the subscriber database always runs with
468-
<varname>session_replication_role</varname> set
469-
to <literal>replica</literal>, which produces the usual effects on triggers
470-
and constraints.
468+
<link linkend="guc-session-replication-role"><varname>session_replication_role</varname></link>
469+
set to <literal>replica</literal>. This means that, by default,
470+
triggers and rules will not fire on a subscriber. Users can optionally choose to
471+
enable triggers and rules on a table using the
472+
<link linkend="sql-altertable"><command>ALTER TABLE</command></link> command
473+
and the <literal>ENABLE TRIGGER</literal> and <literal>ENABLE RULE</literal>
474+
clauses.
471475
</para>
472476

473477
<para>

0 commit comments

Comments
 (0)