Re: Proposal: Conflict log history table for Logical Replication

From: vignesh C <vignesh21(at)gmail(dot)com>
To: Peter Smith <smithpb2250(at)gmail(dot)com>
Cc: Dilip Kumar <dilipbalaut(at)gmail(dot)com>, Nisha Moond <nisha(dot)moond412(at)gmail(dot)com>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, shveta malik <shveta(dot)malik(at)gmail(dot)com>, Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>, Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, shveta malik <shvetamalik(at)gmail(dot)com>
Subject: Re: Proposal: Conflict log history table for Logical Replication
Date: 2026-06-17 13:00:55
Message-ID: CALDaNm2r_5hmz22Gsio=OABvA=c_cr8avv=y19Epb0vKMo+QJQ@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, 16 Jun 2026 at 05:19, Peter Smith <smithpb2250(at)gmail(dot)com> wrote:
>
> On Mon, Jun 8, 2026 at 9:39 PM vignesh C <vignesh21(at)gmail(dot)com> wrote:
> >
> > On Fri, 5 Jun 2026 at 07:59, Peter Smith <smithpb2250(at)gmail(dot)com> wrote:
> > >
> > > Hi Vignesh.
> > >
> > > Some review comments for the patch v45-0004.
> > >
> > > 4c.
> > > IMO there should be a separate function for handling the subscription
> > > footer/s, same as there is already a function
> > > addFooterToPublicationDesc.
> >
> > It is not required in this case as we don't have multiple footers from
> > different places to be added here.
> >
>
> Sure, it's not "required", but I think:
> A) Separating the footer code from the non-footer code makes it easier to read
> B) The 'describeSubscriptions' function is too long. This would make
> it 20 lines shorter.
> C) Consistent footer handling for pub/sub describes.

Ok, Let's keep it consistent

> //////
>
> More review comments for v50-0005
>
> ======
> src/bin/psql/describe.c
>
> 1.
> + /* Conflict log destination is supported in v19 and higher */
> + if (pset.sversion >= 190000)
>
> The CLT is targeting PG20, right? So, that comment ought to say "is
> supported in v20 and higher".
>
> Ideally, there should be some "TODO" reminder comments here to ensure
> the appropriate 190000's get replaced by 200000 as soon as the version
> number is bumped. Better to flag/comment all those places now, so that
> nothing gets missed later.
>
> (A similar review comment probably applies also to the pg_dump changes
> in the previous v50-0004 patch).

I felt it is better to mention it in the commit message of the patch
instead of mentioning it in the code.

The attached v51 version patch has the changes for the same.
The patch also addresses the comment from [1].
[1] - https://www.postgresql.org/message-id/CANhcyEUjc9TCcW1YAQVMTs6-huWBZoy%2BsVkz5C8b72os5p-f%2Bg%40mail.gmail.com

Regards,
Vignesh

Attachment Content-Type Size
v51-0001-Add-configurable-conflict-log-table-for-Logical-.patch application/octet-stream 68.8 KB
v51-0003-Implement-the-conflict-insertion-infrastructure-.patch application/octet-stream 34.7 KB
v51-0002-Report-error-for-ddls-on-conflict-log-tables.patch application/octet-stream 13.5 KB
v51-0004-Preserve-conflict-log-destination-and-subscripti.patch application/octet-stream 23.7 KB
v51-0005-Add-conflict-log-table-information-to-describe-s.patch application/octet-stream 78.7 KB
v51-0006-Documentation-patch.patch application/octet-stream 42.3 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message vignesh C 2026-06-17 13:03:52 Re: Proposal: Conflict log history table for Logical Replication
Previous Message Matthias van de Meent 2026-06-17 12:27:25 Re: Unexpected behavior after OOM errors