Re: Simplify code building the LR conflict messages
Amit Kapila <amit.kapila16@gmail.com>
From: Amit Kapila <amit.kapila16@gmail.com>
To: Álvaro Herrera <alvherre@kurilemu.de>
Cc: Tom Lane <tgl@sss.pgh.pa.us>, Peter Smith <smithpb2250@gmail.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2025-12-04T06:27:21Z
Lists: pgsql-hackers
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Improve errdetail for logical replication conflict messages.
- 48efefa6caac 19 (unreleased) landed
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.