clarifying trigger/rule behavior on logical replication subscribers
Jonathan S. Katz <jkatz@postgresql.org>
From: "Jonathan S. Katz" <jkatz@postgresql.org>
To: Pg Docs <pgsql-docs@lists.postgresql.org>
Date: 2023-06-06T13:58:14Z
Lists: pgsql-docs
Attachments
- v1-0001-doc-Clarify-behavior-of-triggers-rules-in-a-logical-.patch (text/plain) patch v1-0001
Hi, While answering a question on "do triggers fire on a logical replication subscriber by default?" I tried to look up a reference to this behavior in the docs. There wasn't a clear reference point, but on the architecture page[1], I found this line that was closest to the answer: "The apply process on the subscriber database always runs with session_replication_role set to replica, which produces the usual effects on triggers and constraints." which assumes that the reader knows what the "usual effects" are. Attached is a patch that disambiguates this. Two additional items: 1. I do think this should be backpatched because it clarifies an existing behavior. 2. I don't know if we want to add a note about the trigger/rule behavior elsewhere in the logical replication section. I don't know if a reader would be expecting to find this in the "architecture" section. Thanks, Jonathan [1] https://www.postgresql.org/docs/devel/logical-replication-architecture.html
Commits
-
Doc: Clarify the behavior of triggers/rules in a logical subscriber.
- f5c446e33675 16.0 landed
- 8aac6140c8ac 15.4 landed
- 991983fcf650 14.9 landed
- 19867d5f2d5f 13.12 landed
- 8a7ab6bc259a 12.16 landed
- 05fb8954b5aa 11.21 landed