Re: Proposal: Conflict log history table for Logical Replication

From: shveta malik <shveta(dot)malik(at)gmail(dot)com>
To: vignesh C <vignesh21(at)gmail(dot)com>
Cc: Dilip Kumar <dilipbalaut(at)gmail(dot)com>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>, Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, shveta malik <shveta(dot)malik(at)gmail(dot)com>
Subject: Re: Proposal: Conflict log history table for Logical Replication
Date: 2026-01-01 07:02:14
Message-ID: CAJpy0uDB0HAsru6sy3eD_daSAxKp75139D-DVMFTOyXmEJoinQ@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Jan 1, 2026 at 11:43 AM vignesh C <vignesh21(at)gmail(dot)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.

postgres=# create table pg_toast.t1(i int);
ERROR: permission denied to create "pg_toast.t1"
DETAIL: System catalog modifications are currently disallowed.

postgres=# ALTER TABLE sch1.t3 set schema pg_toast;
ERROR: cannot move objects into or out of TOAST schema

thanks
Shveta

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavel Stehule 2026-01-01 07:10:13 not fully correct error message
Previous Message Pavel Stehule 2026-01-01 07:01:04 Re: Patch: dumping tables data in multiple chunks in pg_dump