Re: Proposal: Conflict log history table for Logical Replication
shveta malik <shveta.malik@gmail.com>
From: shveta malik <shveta.malik@gmail.com>
To: Dilip Kumar <dilipbalaut@gmail.com>
Cc: 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>,
shveta malik <shveta.malik@gmail.com>
Date: 2026-01-20T10:38:33Z
Lists: 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
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Allow logical replication conflicts to be logged to a table.
- a5918fddf10d master landed
-
Avoid orphaned objects dependencies
- 2fbb21170e90 19 (unreleased) cited