Re: Proposal: Conflict log history table for Logical Replication

From: vignesh C <vignesh21(at)gmail(dot)com>
To: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
Cc: shveta malik <shveta(dot)malik(at)gmail(dot)com>, Dilip Kumar <dilipbalaut(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>
Subject: Re: Proposal: Conflict log history table for Logical Replication
Date: 2025-12-24 11:59:15
Message-ID: CALDaNm3M+OUNs+HTDrKfOXGGPEaeYJg5vQQZNozJ4MvoJ073Zg@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, 19 Dec 2025 at 11:49, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> wrote:
>
> On Fri, Dec 19, 2025 at 10:40 AM shveta malik <shveta(dot)malik(at)gmail(dot)com> wrote:
> >
> > On Fri, Dec 19, 2025 at 9:53 AM Dilip Kumar <dilipbalaut(at)gmail(dot)com> wrote:
> > >
> >
> > > 2. Do we want to support multi destination then providing string like
> > > 'conflict_log_destination = 'log,table,..' make more sense but then we
> > > would have to store as a string in catalog and parse it everytime we
> > > insert conflicts or alter subscription OTOH currently I have just
> > > support single option log/table/both which make things much easy
> > > because then in catalog we can store as a single char field and don't
> > > need any parsing. And since the input are taken as a string itself,
> > > even if in future we want to support more options like 'log,table,..'
> > > it would be backward compatible with old options.
> >
> > I feel, combination of options might be a good idea, similar to how
> > 'log_destination' provides. But it can be done in future versions and
> > the first draft can be a simple one.
> >
>
> Considering the future extension of storing conflict information in
> multiple places, it would be good to follow log_destination. Yes, it
> is more work now but I feel that will be future-proof.

The attached patch has the changes to specify conflict_log_destination
with a combination of table, log and all. This is implemented in
v15-0006 patch, there is no change in other patched v15-0001 ...
v15-0005 patches which are the same as the patches attached from [1].

[1] - https://www.postgresql.org/message-id/CALDaNm1zR1L2oq-LqYEcc8-wTZYjfJsiaTC_jQ8pGwbm0fv%2B3Q%40mail.gmail.com

Regards,
Vignesh

Attachment Content-Type Size
v15-0002-Implement-the-conflict-insertion-infrastructure-.patch application/octet-stream 34.3 KB
v15-0004-Add-shared-index-for-conflict-log-table-lookup.patch application/octet-stream 13.3 KB
v15-0003-Doccumentation-patch.patch application/octet-stream 11.3 KB
v15-0005-Preserve-conflict-log-destination-for-subscripti.patch application/octet-stream 14.8 KB
v15-0001-Add-configurable-conflict-log-table-for-Logical-.patch application/octet-stream 97.9 KB
v15-0006-logical-replication-allow-combined-conflict_log_.patch application/octet-stream 59.5 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Jelte Fennema-Nio 2025-12-24 13:28:19 cleanup: Split long Makefile lists across lines and sort them
Previous Message Matthias van de Meent 2025-12-24 11:54:48 Re: Why doesn't GiST VACUUM require a super-exclusive lock, like nbtree VACUUM?