Correct StartupSUBTRANS for page wraparound
authorSimon Riggs <[email protected]>
Fri, 19 Feb 2016 08:33:33 +0000 (08:33 +0000)
committerSimon Riggs <[email protected]>
Fri, 19 Feb 2016 08:33:33 +0000 (08:33 +0000)
commit71e3cff2e5956f3edf6d99039dab0424eb82be94
treed132196aaf735bd6be6db2961f8be1f23b8acdbd
parentbf26c4f443a8dd8e6f85ecaf877631a6875770ce
Correct StartupSUBTRANS for page wraparound

StartupSUBTRANS() incorrectly handled cases near the max pageid in the subtrans
data structure, which in some cases could lead to errors in startup for Hot
Standby.
This patch wraps the pageids correctly, avoiding any such errors.
Identified by exhaustive crash testing by Jeff Janes.

Jeff Janes
src/backend/access/transam/subtrans.c