Correct epoch of txid_current() when executed on a Hot Standby server.

Simon Riggs <simon@2ndQuadrant.com>

Commit: 20d98ab6e4110087d1816cd105a40fcc8ce0a307
Author: Simon Riggs <simon@2ndQuadrant.com>
Date: 2012-03-29T13:57:08Z
Releases: 9.1.4
Correct epoch of txid_current() when executed on a Hot Standby server.
Initialise ckptXidEpoch from starting checkpoint and maintain the correct
value as we roll forwards. This allows GetNextXidAndEpoch() to return the
correct epoch when executed during recovery. Backpatch to 9.0 when the
problem is first observable by a user.

Bug report from Daniel Farina

Files

PathChange+/−
src/backend/access/transam/xlog.c modified +26 −4