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>, vignesh C <vignesh21@gmail.com>, Nisha Moond <nisha.moond412@gmail.com>, Peter Smith <smithpb2250@gmail.com>, Masahiko Sawada <sawada.mshk@gmail.com>, Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>, shveta malik <shvetamalik@gmail.com>
Date: 2026-05-05T04:06:55Z
Lists: pgsql-hackers
On Tue, May 5, 2026 at 8:26 AM Amit Kapila <amit.kapila16@gmail.com> wrote:
>
> On Mon, May 4, 2026 at 6:41 PM Dilip Kumar <dilipbalaut@gmail.com> wrote:
> >
> > PFA, poc patch for the same.

I like the idea of PoC. It simplifies the implementation.

> >
>
> I know it is POC but I think you need more work to prevent manual
> inserts/updates on conflict tables.
>

I think CheckValidResultRel() handles it.

postgres=# insert into pg_conflict.pg_conflict_16391 values (0);
ERROR:  cannot modify or insert data into conflict log table "pg_conflict_16391"
DETAIL:  Conflict log tables are system-managed and only support
cleanup via DELETE or TRUNCATE

thanks
Shveta