Re: StandbyRecoverPreparedTransactions recovers subtrans links incorrectly
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Simon Riggs <simon@2ndquadrant.com>
Cc: Nikhil Sontakke <nikhils@2ndquadrant.com>,
Andres Freund <andres@anarazel.de>,
PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2017-04-26T17:25:39Z
Lists: pgsql-hackers
Simon Riggs <simon@2ndquadrant.com> writes: > I've added code following Michael and Tom's comments to the previous > patch. New patch attached. Couple of minor suggestions: * Rather than deleting the comment for SubTransSetParent entirely, maybe make it say "It's possible that the parent was already recorded. However, we should never be asked to change an already-set entry to something else." * In SubTransGetTopmostTransaction, maybe it'd be better to spell "TransactionIdFollowsOrEquals" as "!TransactionIdPrecedes" to make it look more like the test just above. Matter of taste though. * Less a matter of taste is that I think that should be just elog(ERROR); there's no good reason to make it FATAL. * Also, I think there should be a comment there, along the lines of "check for reversed linkage to ensure this isn't an infinite loop". regards, tom lane
Commits
-
Rework handling of subtransactions in 2PC recovery
- 49e928154978 10.0 landed
-
Fix order of arguments to SubTransSetParent().
- f5885488dacb 9.6.3 landed
- 0874d4f3e183 10.0 landed
- 952e33b05275 9.2.21 landed
- a66e01bbcc88 9.5.7 landed
- 8565808733ec 9.3.17 landed
- 2e14541c4992 9.4.12 landed
-
Speedup 2PC recovery by skipping two phase state files in normal path
- 728bd991c3c4 10.0 cited