From: Bertrand Drouvot <bertranddrouvot.pg@gmail.com>
To: vignesh C <vignesh21@gmail.com>
Cc: Zhijie Hou <houzhijie22@gmail.com>
Cc: shveta malik <shveta.malik@gmail.com>
Cc: pgsql-hackers@lists.postgresql.org, amit.kapila16@gmail.com, shveta malik <shvetamalik@gmail.com>
Subject: Re: Avoid resetting subscription two_phase state to pending when already enabled
Date: Thu, 29 Oct 2026 10:41:49 +0000
Message-ID: <auMi7Q5LdFSYCeH8@bdtpg> (raw)
In-Reply-To: <CALDaNm1M4TWztQJAkWGF8pefz8KWELf=uMBWHMQyjKEjvnpCpw@mail.gmail.com>
References: <8e85abdf-738b-4578-ac42-4dc8eaa061dd@gmail.com>
<CAJpy0uBnm2TkxZ3DQcjUqrXUzz07ojkeFamz6Oh=rv8JZwLr9w@mail.gmail.com>
<3ba34b9c-455e-487c-9815-8a7f31297065@gmail.com>
<auMNvwNHAidX1t02@bdtpg>
<CALDaNm1M4TWztQJAkWGF8pefz8KWELf=uMBWHMQyjKEjvnpCpw@mail.gmail.com>
Hi,
On Thu, Oct 29, 2026 at 03:52:46PM +0530, vignesh C wrote:
> There is the following documentation mentioning that slots must be
> created with the same parameters of the subscription at [1].
> When altering the slot_name, the failover and two_phase property
> values of the named slot may differ from the counterpart failover and
> two_phase parameters specified in the subscription. When creating the
> slot, ensure the slot properties failover and two_phase match their
> counterpart parameters of the subscription. Otherwise, the slot on the
> publisher may behave differently from what these subscription options
> say: for example, the slot on the publisher could either be synced to
> the standbys even when the subscription's failover option is disabled
> or could be disabled for sync even when the subscription's failover
> option is enabled.
>
> I'm not sure if this should be handled here as it is documented already.
I agree about the documentation, but the patch introduces a regression: without
the patch, two_phase is enabled on the replacement slot. With the patch, it remains
disabled.
It might be worth fixing, as preserving 'e' only when slot_name is unchanged
should be simple enough.
Regards,
--
Bertrand Drouvot
PostgreSQL Contributors Team
RDS Open Source Databases
Amazon Web Services: https://aws.amazon.com
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-hackers@postgresql.org
Cc: bertranddrouvot.pg@gmail.com, vignesh21@gmail.com, houzhijie22@gmail.com, shveta.malik@gmail.com, shvetamalik@gmail.com
Subject: Re: Avoid resetting subscription two_phase state to pending when already enabled
In-Reply-To: <auMi7Q5LdFSYCeH8@bdtpg>
References: <8e85abdf-738b-4578-ac42-4dc8eaa061dd@gmail.com> <CAJpy0uBnm2TkxZ3DQcjUqrXUzz07ojkeFamz6Oh=rv8JZwLr9w@mail.gmail.com> <3ba34b9c-455e-487c-9815-8a7f31297065@gmail.com> <auMNvwNHAidX1t02@bdtpg> <CALDaNm1M4TWztQJAkWGF8pefz8KWELf=uMBWHMQyjKEjvnpCpw@mail.gmail.com> <auMi7Q5LdFSYCeH8@bdtpg>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox