Correct StartupSUBTRANS for page wraparound

Simon Riggs <simon@2ndQuadrant.com>

Commit: ca32f125b92c91c2abd02e25aede7b52b318f840
Author: Simon Riggs <simon@2ndQuadrant.com>
Date: 2016-02-19T08:35:02Z
Releases: 9.1.21
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

Files

PathChange+/−
src/backend/access/transam/subtrans.c modified +5 −1