Re: Proposal: Conflict log history table for Logical Replication
Nisha Moond <nisha.moond412@gmail.com>
From: Nisha Moond <nisha.moond412@gmail.com>
To: Dilip Kumar <dilipbalaut@gmail.com>
Cc: vignesh C <vignesh21@gmail.com>, Amit Kapila <amit.kapila16@gmail.com>, shveta malik <shveta.malik@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>
Date: 2026-06-29T11:54:36Z
Lists: pgsql-hackers
Thanks for patches, Please find couple of comments for v59-0001 and v59-0002 :
1) Noticed an unexpected behavior in pg_conflict privilege checks.
A combined privilege check (CREATE, USAGE) on the pg_conflict schema
returns 'true', even though both privileges are revoked from the
role/user. Please see the example below -
-- by default, for 'nisha' - CREATE is false and USAGE is true, hence
combined check is true (OK)
CREATE ROLE nisha;
SELECT has_schema_privilege('nisha', 'pg_conflict', 'CREATE, USAGE'); -- true
-- Now revoke USAGE
REVOKE USAGE ON SCHEMA pg_conflict FROM PUBLIC;
-- Single privilege checks
SELECT has_schema_privilege('nisha', 'pg_conflict', 'USAGE'); -- false (OK)
-- Combined mask check
SELECT has_schema_privilege('nisha', 'pg_conflict', 'CREATE,
USAGE'); -- true (not OK)
-- Other way to look at the problem -
postgres=# set role nisha;
postgres=> SELECT schema_name FROM information_schema.schemata;
schema_name
--------------------
pg_conflict --> should not be here
information_schema
public
(3 rows)
~~~
2) Couple of minor typos in patch-001
2a) conflict.c
+ * scalar columns(relid, conflict_type, commit timestamp) while these JSON
/scalar columns(relid, / scalar columns (relid,
2b) subscription.sql
+-- this should generate an conflict log table named pg_conflict_log_$subid$
+CREATE SUBSCRIPTION regress_conflict_test1 CONNECTION 'db...
/generate an conflict/generate a conflict
--
Thanks,
Nisha
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