Re: Conflict detection for update_deleted in logical replication - Mailing list pgsql-hackers

From Amit Kapila
Subject Re: Conflict detection for update_deleted in logical replication
Date
Msg-id CAA4eK1J6bKd3=5OeTr+Qj+kXMPoQrA3rD6J4oo7n1OE=3oWaGQ@mail.gmail.com
Whole thread Raw
In response to Re: Conflict detection for update_deleted in logical replication  (Amit Kapila <amit.kapila16@gmail.com>)
List pgsql-hackers
On Fri, Jun 20, 2025 at 4:48 PM Zhijie Hou (Fujitsu)
<houzj.fnst@fujitsu.com> wrote:
>
> Here is the V39 patch set which includes the following changes:
>

1.
-static void
-create_conflict_slot_if_not_exists(void)
+void
+ApplyLauncherCreateConflictDetectionSlot(void)

I am not so sure about adding ApplyLauncher in front of this function
name. I see most others exposed from this file add such a prefix, but
this one looks odd to me as it has nothing specific to the launcher,
though we use it in launcher? How about
CreateConflictDetectionSlot(void)?

2.
 static void
 create_logical_replication_slots(void)
 {
+ if (!count_old_cluster_logical_slots())
+ return;
+

Doing this count twice (once here and once at the caller of
create_logical_replication_slots) seems redundant.

Apart from the above, attached please find a diff patch atop 0001,
0002, 0003. I think the first three patches look in a reasonable shape
now, can we merge them (0001, 0002, 0003)?

--
With Regards,
Amit Kapila.

Attachment

pgsql-hackers by date:

Previous
From: Amit Kapila
Date:
Subject: Re: Memory allocation error DDL invalidation (seen with 15.13 & 16.9)
Next
From: Anthonin Bonnefoy
Date:
Subject: Re: [PATCH] Add additional extended protocol commands to psql: \parse and \bindx