Re: Proposal: Conflict log history table for Logical Replication

shveta malik <shveta.malik@gmail.com>

From: shveta malik <shveta.malik@gmail.com>
To: Amit Kapila <amit.kapila16@gmail.com>
Cc: Dilip Kumar <dilipbalaut@gmail.com>, Nisha Moond <nisha.moond412@gmail.com>, Peter Smith <smithpb2250@gmail.com>, vignesh C <vignesh21@gmail.com>, Masahiko Sawada <sawada.mshk@gmail.com>, Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>, shveta malik <shveta.malik@gmail.com>
Date: 2026-04-28T04:31:02Z
Lists: pgsql-hackers
On Tue, Apr 28, 2026 at 9:55 AM Amit Kapila <amit.kapila16@gmail.com> wrote:
>
> On Mon, Apr 27, 2026 at 9:51 PM Dilip Kumar <dilipbalaut@gmail.com> wrote:
> >
> > On Mon, Apr 27, 2026 at 3:08 PM shveta malik <shveta.malik@gmail.com> wrote:
> > >
> >
> > > 3)
> > > Also I would like to know which one is better here:
> > >
> > > \dRs+ giving 'Conflict log table' in tabular format (current way)
> > >
> > > Or giving it as 'Conflict log table' at the end, like:
> > >
> > > Conflict Log Table:
> > >     "pg_conflict.pg_conflict_16395"
> > >
> > > I’m slightly inclined toward option 2, similar to how \dRp shows
> > > “Tables” and “Except tables” at the end; it catches the eye faster.
> > > But I don't have a strong opinion here. I'd be interested to hear what
> > > others think.
> >
> > I am not completely convinced, but I don't have a strong opinion
> > against it, so as you said, let's hear from others as well.
> >
>
> Is there a need to even show the CLT name? We create origin also as
> part of subscription but don't display its name in this command.
>

I think the difference is that replication origins are mostly internal
replication state and users do not typically interact with them
directly, so not displaying them in this command seems reasonable. In
contrast, the conflict log table is a user-visible relation that users
may query directly for diagnostics and statistics, so it may make
sense to show it for quick reference.

thanks
Shveta



Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Allow logical replication conflicts to be logged to a table.

  2. Avoid orphaned objects dependencies