Re: Proposal: Conflict log history table for Logical Replication

vignesh C <vignesh21@gmail.com>

From: vignesh C <vignesh21@gmail.com>
To: shveta malik <shveta.malik@gmail.com>
Cc: Dilip Kumar <dilipbalaut@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-01-01T11:04:13Z
Lists: pgsql-hackers
On Thu, 1 Jan 2026 at 12:32, shveta malik <shveta.malik@gmail.com> wrote:
>
> On Thu, Jan 1, 2026 at 11:43 AM vignesh C <vignesh21@gmail.com> wrote:
> >
> >
> >  IsSystemClass(Oid relid, Form_pg_class reltuple)
> >  {
> >         /* IsCatalogRelationOid is a bit faster, so test that first */
> > -       return (IsCatalogRelationOid(relid) || IsToastClass(reltuple));
> > +       return (IsCatalogRelationOid(relid) || IsToastClass(reltuple)
> > +                       || IsConflictClass(reltuple));
> >  }
> >
> >
> > After this change we will not be able to truncate the user created
> > tables in pg_conflict schema:
> > postgres=# create table pg_conflict.t1(c1 int);
> > CREATE TABLE
> > postgres=# insert into pg_conflict.t1 values(1);
> > INSERT 0 1
> >
>
> But do we even want to create user-tables (other than CLT) in
> pg_conflict schema? I feel operations like creation of tables or
> moving any table in and out of pg_conflict schema (as suggested in my
> previous email) should not even be allowed, similar to pg_toast.

I also felt creation of tables should not be allowed, in case we plan
to allow creation, then the other operations also should be allowed.

Regards,
Vignesh



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