Re: Slow catchup of 2PC (twophase) transactions on replica in LR - Mailing list pgsql-hackers

From Amit Kapila
Subject Re: Slow catchup of 2PC (twophase) transactions on replica in LR
Date
Msg-id CAA4eK1JZhA5LWWKDii3AzBruvjhPZcDD9fWFS90_jdf7y-1UUQ@mail.gmail.com
Whole thread Raw
In response to RE: Slow catchup of 2PC (twophase) transactions on replica in LR  ("Hayato Kuroda (Fujitsu)" <kuroda.hayato@fujitsu.com>)
Responses Re: Slow catchup of 2PC (twophase) transactions on replica in LR
List pgsql-hackers
On Mon, Jul 22, 2024 at 8:26 AM Hayato Kuroda (Fujitsu)
<kuroda.hayato@fujitsu.com> wrote:
>
> ```
> @@ -1089,6 +1089,12 @@ CheckAlterSubOption(Subscription *sub, const char *option,
>       * is because both failover and two_phase options of the slot on the
>       * publisher cannot be modified if the slot is currently acquired by the
>       * existing walsender.
> +     *
> +     * XXX: when toggling two_phase from "false" to "true", the slot parameter
> +     * is not modified by the backend process so that the lock conflict won't
> +     * occur. The restarted walsender will do the alternation. Therefore, we
> +     * can allow to switch without the restriction. This can be changed in
> +     * the future based on the requirement.
> ```
>
>

I used a slightly different comment in the attached. Apart from this,
I also addressed comments by Vignesh and Peter. Let me know if I
missed anything.

--
With Regards,
Amit Kapila.

Attachment

pgsql-hackers by date:

Previous
From: Will Mortensen
Date:
Subject: Re: Exposing the lock manager's WaitForLockers() to SQL
Next
From: Bertrand Drouvot
Date:
Subject: Re: Flush pgstats file during checkpoints