Re: Simplify code building the LR conflict messages

From: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
To: "Hayato Kuroda (Fujitsu)" <kuroda(dot)hayato(at)fujitsu(dot)com>
Cc: Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Álvaro Herrera <alvherre(at)kurilemu(dot)de>, Peter Smith <smithpb2250(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Simplify code building the LR conflict messages
Date: 2026-01-08 05:26:18
Message-ID: CAA4eK1J3oRCcQNeEwKoR=ZGY9ijrnz8dfFCkLyPykuiX-whN4g@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Jan 7, 2026 at 3:37 PM Hayato Kuroda (Fujitsu)
<kuroda(dot)hayato(at)fujitsu(dot)com> wrote:
>
> Dear Amit, Sawada-san,
>
> > Fair enough. Also, with the current approach, we don't need to repeat
> > the same LOG message (
> > conflict (multiple_unique_conflicts) detected on relation
> > "public.conf_tab") again and again even though we do similar things at
> > other places[1] (the STATEMENT is repeated). If we have to follow your
> > advice then I can think of following formats:
> ...
>
> Basically they look good to me, but I prefer to clarify the column name for each
> tuples at least once per one output. Like:
>
> ```
> DETAIL: Key (a)=(2) already ... local row (a, b, c) = (2, 2, 2), remote row [(a, b, c) = ](2, 3, 4).
> ```
>
> Admin can easily follow what is the exact reason why it happened.
> Also, the ordering of column can be different between instances, and it may cause
> misunderstanding. Currently they would be re-ordered by the subscriber-side ones,
> but reader may understand by the publisher-side ones.
>

As shown upthread, in existing places where we display the entire row,
we don't use columns, so doesn't see why we need to be different here.
I think but we can display for RI columns.

--
With Regards,
Amit Kapila.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2026-01-08 05:51:14 Re: [PATCH] Provide support for trailing commas
Previous Message Amit Kapila 2026-01-08 05:21:27 Re: POC: enable logical decoding when wal_level = 'replica' without a server restart