Re: Proposal: Conflict log history table for Logical Replication

From: Peter Smith <smithpb2250(at)gmail(dot)com>
To: Dilip Kumar <dilipbalaut(at)gmail(dot)com>
Cc: Nisha Moond <nisha(dot)moond412(at)gmail(dot)com>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, vignesh C <vignesh21(at)gmail(dot)com>, shveta malik <shveta(dot)malik(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>, shveta malik <shvetamalik(at)gmail(dot)com>
Subject: Re: Proposal: Conflict log history table for Logical Replication
Date: 2026-06-02 08:10:35
Message-ID: CAHut+PusJ-7DUjkgsp0sapfTLNVZKYrgYSwNh+f5WbcjGf23mg@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi Dilip.

Some minor review comments for patch v44-0001.

======
src/backend/catalog/aclchk.c

pg_class_aclmask_ext:

1.
+ /*
+ * For conflict log tables, allow non-superusers to perform
+ * DELETE and TRUNCATE for cleanup and maintenance. While still
+ * restricting INSERT, UPDATE, and USAGE.
+ */

/and maintenance. While still/and maintenance, while still/

======
src/backend/catalog/heap.c

heap_create:

2.
+ if (IsConflictLogTableNamespace(relnamespace))
+ ereport(ERROR,
+ (errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
+ errmsg("permission denied to create \"%s.%s\"",
+ get_namespace_name(relnamespace), relname),
+ errdetail("Conflict schema modifications are currently disallowed.")));

This should use the new function to get the schema-qualified relname,
and substitute into "%s" instead of "%s.%s".

======
src/backend/commands/subscriptioncmds.c

CreateSubscription:

3.
+ /*
+ * Establish an internal dependency between conflict log table and
+ * subscription.
+ *
+ * We use DEPENDENCY_INTERNAL to signify that the table's lifecycle is
+ * strictly tied to the subscription, similar to how a TOAST table relates
+ * to its main table or a sequence relates to an identity column.
+ *
+ * This ensures the conflict log table is automatically reaped during a
+ * DROP SUBSCRIPTION via performDeletion().
+ */

/between conflict log table and subscription./between the conflict log
table and the subscription./

======
Kind Regards,
Peter Smith.
Fujitsu Australia

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrey Borodin 2026-06-02 08:14:45 Re: Multi-Entry Indexing for GiST & SP-GiST
Previous Message Chao Li 2026-06-02 07:58:24 Re: pg_createsubscriber: allow duplicate publication names