Re: Simplify code building the LR conflict messages - Mailing list pgsql-hackers

From Amit Kapila
Subject Re: Simplify code building the LR conflict messages
Date
Msg-id CAA4eK1+X5PQ00RFjhKcb_4TQ_J0h8tvtwP32YKgrPrKU7360ug@mail.gmail.com
Whole thread Raw
In response to Re: Simplify code building the LR conflict messages  (Álvaro Herrera <alvherre@kurilemu.de>)
List pgsql-hackers
On Wed, Dec 3, 2025 at 8:11 PM Álvaro Herrera <alvherre@kurilemu.de> wrote:
>
> On 2025-Dec-01, Amit Kapila wrote:
>
> > The reason for displaying in this style is that, in conflicts, users
> > may want to define their custom resolution strategies based on
> > conflict_type. Sometimes they need to resolve conflicts manually as
> > well. To make an informed decision on which version of the row is
> > "correct," the human reviewer needs full context.
>
> I think it's odd that conflict resolution depends on log entries.  I
> think it would be much more valuable if conflict reporting would save
> the details of the conflict to some kind of conflict logging table.
>

Yes, that is more valuable, and as mentioned by Mihail, we are already
discussing the same. However, that has its own challenges, like it
needs some form of manual management by the user to clean up the
conflict_history table. Also, one can say that because table insert is
a heavy operation and more prone to failures, it is better to LOG it.
Yes, the user would require some form of script to extract the
information from the LOG, so both methods have their pros and cons. I
think we will need a configurable knob to let the user decide which
way they prefer to log the conflict information.

--
With Regards,
Amit Kapila.



pgsql-hackers by date:

Previous
From: "cca5507"
Date:
Subject: Re: Support loser tree for k-way merge
Next
From: Amit Kapila
Date:
Subject: Re: Simplify code building the LR conflict messages