Derive oldestActiveXid at correct time for Hot Standby.
authorSimon Riggs <simon@2ndQuadrant.com>
Wed, 2 Nov 2011 08:53:40 +0000 (08:53 +0000)
committerSimon Riggs <simon@2ndQuadrant.com>
Wed, 2 Nov 2011 08:53:40 +0000 (08:53 +0000)
commitbf70bf4c7177bdd5c6644da65c0ccea47405d5f3
tree1767f481881a6c76a880034c98abfd85e73d6b7a
parent93b915b3d1c1a325a6458f9553a37b89d244262b
Derive oldestActiveXid at correct time for Hot Standby.
There was a timing window between when oldestActiveXid was derived
and when it should have been derived that only shows itself under
heavy load. Move code around to ensure correct timing of derivation.
No change to StartupSUBTRANS() code, which is where this failed.

Bug report by Chris Redekop
src/backend/access/transam/xlog.c
src/backend/storage/ipc/procarray.c
src/backend/storage/ipc/standby.c
src/include/storage/procarray.h
src/include/storage/standby.h