Re: Proposal: Conflict log history table for Logical Replication - Mailing list pgsql-hackers

From shveta malik
Subject Re: Proposal: Conflict log history table for Logical Replication
Date
Msg-id CAJpy0uAR_3YzA8fXHGnnZN8GLDBwPpQ=VJD5478GaTPQ5gMYhg@mail.gmail.com
Whole thread Raw
In response to Re: Proposal: Conflict log history table for Logical Replication  (Dilip Kumar <dilipbalaut@gmail.com>)
List pgsql-hackers
On Tue, Jan 13, 2026 at 4:09 PM Dilip Kumar <dilipbalaut@gmail.com> wrote:
>
> On Tue, Jan 13, 2026 at 3:59 PM shveta malik <shveta.malik@gmail.com> wrote:
> >
> > 1)
> > I am able to insert and update rows in pg_conflict.pg_conflict_16394.
> > It should be restricted.
> >
> > 2)
> > I think we need to block 'SELECT for UPDATE' and similar operations on
> > CLT. Currently it is allowed on CLT.
> > See this:
> >
> > postgres=# SELECT * FROM  pg_toast.pg_toast_3466 for UPDATE;
> > ERROR:  cannot lock rows in TOAST relation "pg_toast_3466"
> > postgres=# SELECT * FROM pg_conflict.pg_conflict_16394 for UPDATE;
> > ....
>

I had a quick look at v23-001, I see that it has INSERT and UPDATE
blocked but SELECt for UPDATE is still working. I do not see any
strong need to provide this flexibility for user-level concurrency
control on conflict-tables. Shall this be blocked as well?

Also, the error I get for INSERT and UPDATE is:

postgres=# update pg_conflict.pg_conflict_16390 set relid=1;
ERROR:  cannot modify or insert data for conflict log table "pg_conflict_16390"
DETAIL:  Conflict log tables are system-managed and only support
cleanup via DELETE or TRUNCATE.

I feel "cannot modify or insert data into conflict log table ..."
seems more natural.

thanks
Shveta



pgsql-hackers by date:

Previous
From: Andrey Borodin
Date:
Subject: Re: Fix gistkillitems & add regression test to microvacuum
Next
From: Christoph Berg
Date:
Subject: Re: Optional skipping of unchanged relations during ANALYZE?