Re: Proposal: Conflict log history table for Logical Replication

Dilip Kumar <dilipbalaut@gmail.com>

From: Dilip Kumar <dilipbalaut@gmail.com>
To: shveta malik <shveta.malik@gmail.com>
Cc: Nisha Moond <nisha.moond412@gmail.com>, Peter Smith <smithpb2250@gmail.com>, vignesh C <vignesh21@gmail.com>, Amit Kapila <amit.kapila16@gmail.com>, Masahiko Sawada <sawada.mshk@gmail.com>, Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2026-04-28T04:20:13Z
Lists: pgsql-hackers
On Tue, Apr 28, 2026 at 9:46 AM shveta malik <shveta.malik@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:
> > >
> > > Few comments on 001 alone:
> > >
> > >
> > > 1)
> > > postgres=# create publication pub1 for all tables except (table temp_table);
> > > ERROR:  cannot specify relation "temp_table" in the publication EXCEPT clause
> > > DETAIL:  This operation is not supported for temporary tables.
> > >
> > > postgres=# create publication pub1 for all tables except (table
> > > pg_conflict.pg_conflict_16395);
> > > ERROR:  cannot add relation "pg_conflict.pg_conflict_16395" to publication
> > > DETAIL:  This operation is not supported for conflict log tables.
> > >
> > > We shall change the error message for CLT in alignement with new
> > > EXCEPT error message added recently.
> >
> > Yeah we should do that. I see the string we used in
> > check_publication_add_relation() is non-schema qualified e.g. If you
> > see the example below, the schemaname is omitted in the error message.
> > Ideally, I would like this to be schema qualified but that can be
> > fixed separately.
>
> I agree. Initially I thought it might not be needed for temp table
> error. But this could be confusing for unlogged tables. I created 2
> tables: public.t1 (logged) and s1.t1 (unlogged), the error became
> unclear for unlogged tables as it referred to t1 instead of s1.t1.
> Yes, this can be done in a new thread.

Right, I've created that as a base patch before making my changes, so
I will post it shortly in a separate thread.

-- 
Regards,
Dilip Kumar
Google



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