Re: Proposal: Conflict log history table for Logical Replication

From: Nisha Moond <nisha(dot)moond412(at)gmail(dot)com>
To: Dilip Kumar <dilipbalaut(at)gmail(dot)com>
Cc: vignesh C <vignesh21(at)gmail(dot)com>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, shveta malik <shveta(dot)malik(at)gmail(dot)com>, Peter Smith <smithpb2250(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>
Subject: Re: Proposal: Conflict log history table for Logical Replication
Date: 2026-06-29 11:54:36
Message-ID: CABdArM5SdnXnQQs-Ja6bZEUxKwMJYewN+0oF71QxWzYagc34uw@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Antonin Houska 2026-06-29 11:57:26 Allow progress tracking of sub-commands
Previous Message Etsuro Fujita 2026-06-29 11:50:45 Re: use of SPI by postgresImportForeignStatistics