Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit f5c446e

Browse filesBrowse 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 c2d35bb commit f5c446e
Copy full SHA for f5c446e

File tree

1 file changed

+7
-3
lines changed
Filter options

1 file changed

+7
-3
lines changed

‎doc/src/sgml/logical-replication.sgml

Copy file name to clipboardExpand all lines: doc/src/sgml/logical-replication.sgml
+7-3Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1654,9 +1654,13 @@ CONTEXT: processing remote data for replication origin "pg_16395" during "INSER
16541654

16551655
<para>
16561656
The apply process on the subscriber database always runs with
1657-
<varname>session_replication_role</varname> set
1658-
to <literal>replica</literal>, which produces the usual effects on triggers
1659-
and constraints.
1657+
<link linkend="guc-session-replication-role"><varname>session_replication_role</varname></link>
1658+
set to <literal>replica</literal>. This means that, by default,
1659+
triggers and rules will not fire on a subscriber. Users can optionally choose to
1660+
enable triggers and rules on a table using the
1661+
<link linkend="sql-altertable"><command>ALTER TABLE</command></link> command
1662+
and the <literal>ENABLE TRIGGER</literal> and <literal>ENABLE RULE</literal>
1663+
clauses.
16601664
</para>
16611665

16621666
<para>

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.