Hi,

On Wed, Nov25, 2026 at 01:43 PM Nisha Moond wrote:

Please find attached patch with the comment change suggested above. It
also combines a few pending fixes for commit a5918fddf1:
  1) The missing pg_subscription column entries in catalogs.sgml, and
some code comment rewrites from [1].
  2) The issue reported by Zsolt and the fix he provided at [2]
Thanks for sharing the patch.

I have few comments:

1.
@@ -2777,6 +2780,14 @@ DropSubscription(DropSubscriptionStmt *stmt, bool isTopLevel)
        if (slotname)
                PreventInTransactionBlock(isTopLevel, "DROP SUBSCRIPTION");

+       /*
+        * Drop the conflict log table first.  With RESTRICT this fails if other
+        * objects depend on it, so do it before any non-transactional cleanup
+        * below.
+        */
+       drop_sub_conflict_log_table(subid, subname, subconflictlogrelid,
+                                                               stmt->behavior);

Moving drop_sub_conflict_log_table() here places it before the LookupGXactBySubid() check, which breaks the 2PC deadlock guard added in 6a0a66b3e7.

2.
When ALTER SUBSCRIPTION ... SET (conflict_log_destination = 'log') fails due to dependent objects on the conflict log table, it reports:

ERROR:  cannot drop subscription sub1 because other objects depend on it
DETAIL:  view mon_view depends on table pg_conflict.pg_conflict_log_16399
HINT:  Use DROP ... CASCADE to drop the dependent objects too.

This message gives the impression that we are dropping the subscription, whereas ALTER SUBSCRIPTION is only dropping the conflict log table.

3.
+ * ... DELETE and
+ * TRUNCATE are the only data operations allowed, so that users can still
+ * prune old conflict rows.

I think we shall either mention SELECT here as well, since users can query from the conflict log table.

--
Best Regards,
Zhijie Hou


Reply via email to