Re: Incorrect snapshots while promoting hot standby node when 2PC is used
Michael Paquier <michael@paquier.xyz>
From: Michael Paquier <michael@paquier.xyz>
To: Andres Freund <andres@anarazel.de>
Cc: pgsql-hackers@postgresql.org, Michael Paquier <michael.paquier@gmail.com>, Simon Riggs <simon@2ndquadrant.com>, Thomas Munro <thomas.munro@gmail.com>
Date: 2021-05-31T12:37:17Z
Lists: pgsql-hackers
Attachments
- end-recovery-2pc.patch (text/x-diff) patch
On Thu, May 27, 2021 at 10:01:49AM -0700, Andres Freund wrote: > Why would it be intrusive? We're talking a split second here, no? More > importantly, I don't think it's correct to release the locks at that > point. I have been looking at all that for the last couple of days, and checked the code to make sure that relying on RecoveryInProgress() as the tipping point is logically correct in terms of virtual XID, snapshot build and KnownAssignedXids cleanup. This stuff is tricky enough that I may have missed something, but my impression (and testing) is that we should be safe. I am adding this patch to the next CF for now. More eyes are needed. -- Michael
Commits
-
Fix snapshot builds during promotion of hot standby node with 2PC
- e2b2a9e1c3d5 9.6.24 landed
- 8a6a1fe07e06 10.19 landed
- 0a561d4d0016 11.14 landed
- 3c3f118d503c 12.9 landed
- 194e535a07b3 13.5 landed
- 828f7f0009ed 14.1 landed
- 8a4237908c0f 15.0 landed