Re: Fix slot synchronization with two_phase decoding enabled

From: Nisha Moond <nisha(dot)moond412(at)gmail(dot)com>
To: shveta malik <shveta(dot)malik(at)gmail(dot)com>
Cc: Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, "Zhijie Hou (Fujitsu)" <houzj(dot)fnst(at)fujitsu(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Fix slot synchronization with two_phase decoding enabled
Date: 2025-05-07 11:06:41
Message-ID: CABdArM7TtKZ=ZtX3MVF1oGCWgO3isd7ojFZKW3F+-QZL5iumFA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, May 7, 2025 at 10:32 AM shveta malik <shveta(dot)malik(at)gmail(dot)com> wrote:
>
> On Mon, May 5, 2025 at 3:29 PM Nisha Moond <nisha(dot)moond412(at)gmail(dot)com> wrote:
> >
> > Please find the v12 patch with above suggested changes.
> >
>
> Thanks for the patch. Few comments for doc changes:
>
> 1)
> func.sgml - pg_create_logical_replication_slot:
>
> + failover. The parameters <parameter>twophase</parameter> and
> + <parameter>failover</parameter> cannot be enabled together when
> + creating a replication slot. However, a slot created with
> <parameter>twophase</parameter>
> + enabled can later have <parameter>failover</parameter> set to true
> + either using <command>ALTER_REPLICATION_SLOT</command> or via
> + <command>ALTER SUBSCRIPTION</command> if a subscription is using this
> + slot.
>
> Will it be better if we make a NOTE for this? Also can we create links for
> <command>ALTER SUBSCRIPTION</command> and
> <command>ALTER_REPLICATION_SLOT</command>?
>
> 2)
> protocol.sgml:
>
> + The default is false. This option cannot be set together with
> + <literal>failover</literal> when creating a logical replication slot.
> + However, once the slot is created with <literal>two_phase =
> true</literal>,
> + <literal>failover</literal> can be set to true after the slot has
> + consumed all the changes up to the point where two-phase decoding
> + was enabled.
>
> Can we make a new paragraph for the new restriction added. Same for
> other new restriction in this page.
>
> 3)
> create_subscription.sgml:
>
> + cannot be enabled together when creating a subscription. However, a
> + <literal>two_phase</literal> enabled subscription can later have
> + <literal>failover</literal> set to true via <command>ALTER
> SUBSCRIPTION</command>,
>
> via-->using
>

Attached is the v13 patch with the above comments addressed.

--
Thanks,
Nisha

Attachment Content-Type Size
v13-0001-PG17-Approach-3-Fix-slot-synchronization-for-two.patch application/x-patch 25.4 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Nikhil Kumar Veldanda 2025-05-07 12:15:40 Re: ZStandard (with dictionaries) compression support for TOAST compression
Previous Message Yugo Nagata 2025-05-07 10:59:41 Re: PG 18 release notes draft committed