Re: Add the replication origin name and commit-LSN to logical replication worker errcontext
Masahiko Sawada <sawada.mshk@gmail.com>
From: Masahiko Sawada <sawada.mshk@gmail.com>
To: Euler Taveira <euler@eulerto.com>
Cc: Amit Kapila <amit.kapila16@gmail.com>,
Peter Smith <smithpb2250@gmail.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2022-03-07T01:05:25Z
Lists: pgsql-hackers
Attachments
- v5-0002-Add-the-origin-name-and-remote-commit-LSN-to-logi.patch (application/octet-stream) patch v5-0002
- v5-0001-Use-complete-sentences-in-logical-replication-wor.patch (application/octet-stream) patch v5-0001
On Fri, Mar 4, 2022 at 9:32 PM Euler Taveira <euler@eulerto.com> wrote: > > On Fri, Mar 4, 2022, at 2:54 AM, Amit Kapila wrote: > > The LSN of the transaction that contains the change violating the > constraint and the replication origin name can be found from the > server log (LSN 0/14C0378 and replication origin > <literal>pg_16395</literal> in the above case). To skip the > transaction, the subscription needs to be disabled temporarily by > <command>ALTER SUBSCRIPTION ... DISABLE</command> first. Then, the > transaction can be skipped by calling the <link > linkend="pg-replication-origin-advance"> > <function>pg_replication_origin_advance()</function></link> function > with the <parameter>node_name</parameter> (i.e., > <literal>pg_16395</literal>) and the next LSN of the commit LSN (i.e., > LSN 0/14C0379). > > You could also add: > > After that the replication can be resumed by <command>ALTER SUBSCRIPTION ... > ENABLE</command>. > > Let's provide complete instructions. Thank you for the comment. +1. I've attached updated patches. Regards, -- Masahiko Sawada EDB: https://www.enterprisedb.com/
Commits
-
Add the additional information to the logical replication worker errcontext.
- d3e8368c4b6e 15.0 landed
-
Make the errcontext message in logical replication worker translation friendly.
- 5e0e99a80b2f 15.0 landed
-
Add logical change details to logical replication worker errcontext.
- abc0910e2e0a 15.0 cited