Derive oldestActiveXid at correct time for Hot Standby.
authorSimon Riggs <simon@2ndQuadrant.com>
Wed, 2 Nov 2011 08:54:56 +0000 (08:54 +0000)
committerSimon Riggs <simon@2ndQuadrant.com>
Wed, 2 Nov 2011 08:54:56 +0000 (08:54 +0000)
commit86e33648992cfc104836ab1fbb6e654308beb4a5
treec11d1ff97fea09f9bf20a961df11bebeb5316c5c
parent10b7c686e52a6d1bb10194ebf9331ef06f044d46
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