RE: Proposal: Conflict log history table for Logical Replication

From: "Hayato Kuroda (Fujitsu)" <kuroda(dot)hayato(at)fujitsu(dot)com>
To: 'Nisha Moond' <nisha(dot)moond412(at)gmail(dot)com>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
Cc: Zhijie Hou <houzhijie22(at)gmail(dot)com>, vignesh C <vignesh21(at)gmail(dot)com>, Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>, shveta malik <shveta(dot)malik(at)gmail(dot)com>, shihao zhong <zhong950419(at)gmail(dot)com>, Dilip Kumar <dilipbalaut(at)gmail(dot)com>, saurabh singh <saurabh(dot)singh214(at)gmail(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Peter Smith <smithpb2250(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-11-25 07:45:17
Message-ID: OS7PR01MB18317B762AB52701879CCFB09F5432@OS7PR01MB18317.jpnprd01.prod.outlook.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi Nisha,

Thanks for posting the patch. Here is my comment.

01.
This patch could not pass a test 035_conflicts, it stucked at line 1226-1227.
I suspected because drop_sub_conflict_log_table exists before the 2PC check.

02.
```
ObjectAddressSet(object, SubscriptionRelationId, subid);
- performDeletion(&object, DROP_CASCADE,
+ performDeletion(&object, behavior,
PERFORM_DELETION_INTERNAL |
PERFORM_DELETION_SKIP_ORIGINAL);
```

As Hou-san pointed out, this would report "cannot drop subscription" error even
while in ALTER SUBSCRIPTION, because the subscription is specified for performDeletion().

How about removing the dependecy between the CLT and subscription via
deleteDependencyRecordsForSpecific(objectId := subconflictlogrelid) first then do
performDeletion() for the CLT?

Best regards,
Hayato Kuroda
FUJITSU LIMITED

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alexandre Felipe 2026-11-25 07:54:56 Re: SLOPE - Planner optimizations on monotonic expressions.
Previous Message Fujii Masao 2026-11-25 07:24:30 Re: Ensure temporary files are unlinked on errors in pg_receivewal