Re: Slow catchup of 2PC (twophase) transactions on replica in LR

Amit Kapila <amit.kapila16@gmail.com>

From: Amit Kapila <amit.kapila16@gmail.com>
To: "Hayato Kuroda (Fujitsu)" <kuroda.hayato@fujitsu.com>
Cc: Peter Smith <smithpb2250@gmail.com>, "Zhijie Hou (Fujitsu)" <houzj.fnst@fujitsu.com>, "pgsql-hackers@lists.postgresql.org" <pgsql-hackers@lists.postgresql.org>, Vitaly Davydov <v.davydov@postgrespro.ru>, Ajin Cherian <itsajin@gmail.com>
Date: 2024-07-18T11:42:46Z
Lists: pgsql-hackers

Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Fix random failure in 021_twophase.

  2. Allow altering of two_phase option of a SUBSCRIPTION.

  3. Doc: use true|false rather than on|off for "failover" option

  4. Support an optional asynchronous commit mode, in which we don't flush WAL

Attachments

On Thu, Jul 18, 2024 at 7:40 AM Hayato Kuroda (Fujitsu)
<kuroda.hayato@fujitsu.com> wrote:
>
> Regarding the CheckAlterSubOption(), the ordering is still preserved
> because I preferred to keep some specs. But I can agree that yours
> make codes simpler.
>

It is better to simplify the code in this case. I have taken care of
this in the attached.

> BTW, I started to think patches can be merged in future versions because
> they must be included at once and codes are not so long. Thought?
>

I agree and have done that in the attached. I have made some
additional changes: (a) removed the unrelated change of two_phase in
protocol.sgml, (b) tried to make the two_phase change before failover
option wherever it makes sense to keep the code consistent, (c)
changed/added comments and doc changes at various places.

I'll continue my review and testing of the patch but I thought of
sharing what I have done till now.

-- 
With Regards,
Amit Kapila.