Re: Proposal: Conflict log history table for Logical Replication

From: Zhijie Hou <houzhijie22(at)gmail(dot)com>
To: Dilip Kumar <dilipbalaut(at)gmail(dot)com>
Cc: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, Nisha Moond <nisha(dot)moond412(at)gmail(dot)com>, Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>, shveta malik <shveta(dot)malik(at)gmail(dot)com>, vignesh C <vignesh21(at)gmail(dot)com>, saurabh singh <saurabh(dot)singh214(at)gmail(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Peter Smith <smithpb2250(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: 2026-10-08 05:20:52
Message-ID: CAFvd2n92EXzt7VNRGxQCMkK1t2+6RA9SwQ5j9DHMwJcWCNoK1Q@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On Sun, Oct 4, 2026 at 5:01 PM Dilip Kumar <dilipbalaut(at)gmail(dot)com> wrote:
>
>
> And without fix shared as a v77-0003 [1], this would error out with
> below error[2], I have explained the reason [1]. I have added a
> testcase in 035_conflicts.pl file in v79-0003 patch for this issue.

Thanks for updating the patches.

I've started reviewing the 0001 patch and would like to suggest some refactoring
to simplify the code in ReportApplyConflict(). The idea is to move the fallback
logic into get_conflictlog_dest_and_table() so the caller's code looks cleaner.

And I think we could build the errdetail for both the table and
logfile cases and call ereport() only once, to reduce the duplicated code.

Please check the attached follow-up patches (on top of 0001), I hope it makes
the code better.(1 file changed, 33 insertions(+), 58 deletions(-))

Best Regards,
Zhijie Hou

Attachment Content-Type Size
nocfbot-Topup-0001-Simplify-codes.patch application/octet-stream 5.7 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Masahiko Sawada 2026-10-08 05:49:02 Re: Parallel autovacuum: DROP DATABASE WITH (FORCE) fails on the parallel workers
Previous Message solai v 2026-10-08 05:12:02 Re: Idea to enhance pgbench by more modes to generate data (multi-TXNs, UNNEST, COPY BINARY)