Re: Slow catchup of 2PC (twophase) transactions on replica in LR
Peter Smith <smithpb2250@gmail.com>
From: Peter Smith <smithpb2250@gmail.com>
To: "Hayato Kuroda (Fujitsu)" <kuroda.hayato@fujitsu.com>
Cc: "Zhijie Hou (Fujitsu)" <houzj.fnst@fujitsu.com>,
Amit Kapila <amit.kapila16@gmail.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-17T07:53:28Z
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
Attachments
- PS_NITPICKS_20240717_v190001.txt (text/plain)
Hi, here are my review comments for v19-0001. ====== doc/src/sgml/protocol.sgml nitpick - Now there is >1 option. /The following option is supported:/The following options are supported:/ ====== src/backend/access/transam/twophase.c TwoPhaseTransactionGid: nitpick - renamed parameter /gid/gid_res/ to emphasize that this is returned by reference ~~~ 1. IsTwoPhaseTransactionGidForSubid + /* Construct the format GID based on the got xid */ + TwoPhaseTransactionGid(subid, xid, gid_generated, sizeof(gid)); I think the wrong size is being passed here. It should be the buffer size -- e.g. sizeof(gid_generated). ~ nitpick - renamed a couple of vars for readability nitpick - expanded some comments. ====== src/backend/commands/subscriptioncmds.c 2. AlterSubscription + /* + * slot_name and two_phase cannot be altered + * simultaneously. The latter part refers to the pre-set + * slot name and tries to modify the slot option, so + * changing both does not make sense. + */ I had given a v18-0002 nitpick suggestion to re-word all of this comment. But, as I wrote before [1], that fix belongs here in patch 0001 where the comment was first added. ====== [1] https://www.postgresql.org/message-id/CAHut%2BPsqMRS3dcijo5jsTSbgV1-9So-YBC7PH7xg0%2BZ8hA7fDQ%40mail.gmail.com Kind Regards, Peter Smith. Fujitsu Australia