RE: Conflict detection for update_deleted in logical replication

From: "Zhijie Hou (Fujitsu)" <houzj(dot)fnst(at)fujitsu(dot)com>
To: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
Cc: shveta malik <shveta(dot)malik(at)gmail(dot)com>, vignesh C <vignesh21(at)gmail(dot)com>, Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>, Nisha Moond <nisha(dot)moond412(at)gmail(dot)com>, "Hayato Kuroda (Fujitsu)" <kuroda(dot)hayato(at)fujitsu(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: RE: Conflict detection for update_deleted in logical replication
Date: 2025-06-30 13:28:35
Message-ID: OS0PR01MB57168BE5DB3408A85C799A569446A@OS0PR01MB5716.jpnprd01.prod.outlook.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Jun 30, 2025 at 7:22 PM Amit Kapila wrote:
>
> On Fri, Jun 27, 2025 at 7:58 AM Zhijie Hou (Fujitsu) <houzj(dot)fnst(at)fujitsu(dot)com>
> wrote:
> >
> > Here is the V43 patch set which includes the following changes:
> >
>
> Few minor comments:
> 1.
> @@ -29645,8 +29651,10 @@ postgres=# SELECT '0/0'::pg_lsn +
> pd.segment_number * ps.setting::int + :offset
> Copies an existing logical replication slot
> named <parameter>src_slot_name</parameter> to a logical
> replication
> slot named <parameter>dst_slot_name</parameter>, optionally
> changing
> - the output plugin and persistence. The copied logical slot starts
> - from the same <acronym>LSN</acronym> as the source logical slot.
> Both
> + the output plugin and persistence. The name cannot be
> + <literal>pg_conflict_detection</literal> as it is reserved for
> + the conflict detection. The copied logical slot starts from the same
> + <acronym>LSN</acronym> as the source logical slot. Both
>
> /The name/The new slot name
>
> 2. The server version checks can be modified to 19000 as a new branch is
> created now.
>
> 3.
> This ensures that if the launcher loses track of the slot after
> +   * a restart, it will remember to drop the slot when it is no longer
> +   * requested by any subscription.
>
> The link between the first part of the sentence before the comma is not clear
> with the remaining part of the sentence. How about writing it as: "Acquire the
> conflict detection slot at startup to ensure it can be dropped if no longer needed
> after a restart."?

Thanks for the comments. I have addressed above in V44 patch set.

Only 0001 is modified in this version.

Best Regards,
Hou zj

Attachment Content-Type Size
v44-0005-Allow-altering-retain_conflict_info-for-enabled-.patch application/octet-stream 32.7 KB
v44-0001-Preserve-conflict-relevant-data-during-logical-r.patch application/octet-stream 172.7 KB
v44-0002-Introduce-a-new-GUC-max_conflict_retention_durat.patch application/octet-stream 31.1 KB
v44-0003-Re-create-the-replication-slot-if-the-conflict-r.patch application/octet-stream 7.0 KB
v44-0004-Support-the-conflict-detection-for-update_delete.patch application/octet-stream 30.3 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Nathan Bossart 2025-06-30 13:31:44 Re: add function for creating/attaching hash table in DSM registry
Previous Message Nathan Bossart 2025-06-30 13:25:37 Re: pg_get_multixact_members not documented