Re: Proposal: Conflict log history table for Logical Replication
vignesh C <vignesh21@gmail.com>
From: vignesh C <vignesh21@gmail.com>
To: Amit Kapila <amit.kapila16@gmail.com>
Cc: shveta malik <shveta.malik@gmail.com>,
Dilip Kumar <dilipbalaut@gmail.com>, Masahiko Sawada <sawada.mshk@gmail.com>, Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2025-12-24T11:59:15Z
Lists: pgsql-hackers
Attachments
- v15-0002-Implement-the-conflict-insertion-infrastructure-.patch (application/octet-stream)
- v15-0004-Add-shared-index-for-conflict-log-table-lookup.patch (application/octet-stream)
- v15-0003-Doccumentation-patch.patch (application/octet-stream)
- v15-0005-Preserve-conflict-log-destination-for-subscripti.patch (application/octet-stream)
- v15-0001-Add-configurable-conflict-log-table-for-Logical-.patch (application/octet-stream)
- v15-0006-logical-replication-allow-combined-conflict_log_.patch (application/octet-stream)
On Fri, 19 Dec 2025 at 11:49, Amit Kapila <amit.kapila16@gmail.com> wrote: > > On Fri, Dec 19, 2025 at 10:40 AM shveta malik <shveta.malik@gmail.com> wrote: > > > > On Fri, Dec 19, 2025 at 9:53 AM Dilip Kumar <dilipbalaut@gmail.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