Re: Slow catchup of 2PC (twophase) transactions on replica in LR
Vitaly Davydov <v.davydov@postgrespro.ru>
From: Давыдов Виталий <v.davydov@postgrespro.ru>
To: "Amit Kapila" <amit.kapila16@gmail.com>
Cc: "Ajin Cherian" <itsajin@gmail.com>,
"Heikki Linnakangas" <hlinnaka@iki.fi>, pgsql-hackers@lists.postgresql.org
Date: 2024-04-10T14:16:59Z
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 →
-
Fix random failure in 021_twophase.
- 0dcea330babd 18.0 landed
-
Allow altering of two_phase option of a SUBSCRIPTION.
- 1462aad2e447 18.0 landed
-
Doc: use true|false rather than on|off for "failover" option
- fa65a022db26 17.0 cited
-
Support an optional asynchronous commit mode, in which we don't flush WAL
- 4a78cdeb6b59 8.3.0 cited
Hi Amit, Ajin, All Thank you for the patch and the responses. I apologize for my delayed answer due to some curcumstances. On Wednesday, April 10, 2024 14:18 MSK, Amit Kapila <amit.kapila16@gmail.com> wrote: Vitaly, does the minimal solution provided by the proposed patch (Allow to alter two_phase option of a subscriber provided no uncommitted prepared transactions are pending on that subscription.) address your use case?In general, the idea behind the patch seems to be suitable for my case. Furthermore, the case of two_phase switch from false to true with uncommitted pending prepared transactions probably never happens in my case. The switch from false to true means that the replica completes the catchup from the master and switches to the normal mode when it participates in the multi-node configuration. There should be no uncommitted pending prepared transactions at the moment of the switch to the normal mode. I'm going to try this patch. Give me please some time to investigate the patch. I will come with some feedback a little bit later. Thank you for your help! With best regards, Vitaly Davydov