Re: clarifying trigger/rule behavior on logical replication subscribers

From: vignesh C <vignesh21(at)gmail(dot)com>
To: "Jonathan S(dot) Katz" <jkatz(at)postgresql(dot)org>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
Cc: Pg Docs <pgsql-docs(at)lists(dot)postgresql(dot)org>
Subject: Re: clarifying trigger/rule behavior on logical replication subscribers
Date: 2023-06-07 10:39:47
Message-ID: CALDaNm1fAaeOhdTts3LgXs_e1TPZke3-HqFA9b8ZjVXOM66H5Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs

On Wed, 7 Jun 2023 at 10:17, Jonathan S. Katz <jkatz(at)postgresql(dot)org> wrote:
>
> 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.
>

Thanks for the patch, one small change required, "literal>" should be
"<literal>":
+ 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>

Regards,
Vignesh

In response to

Responses

Browse pgsql-docs by date

  From Date Subject
Next Message Peter Eisentraut 2023-06-07 15:17:47 Re: confusing positioning of notes in connection settings
Previous Message Kirk Wolak 2023-06-06 19:48:42 Re: pass open cursor via USING in execute staement