diff options
| author | Simon Riggs <simon@2ndQuadrant.com> | 2011-11-02 08:52:59 +0000 |
|---|---|---|
| committer | Simon Riggs <simon@2ndQuadrant.com> | 2011-11-02 08:52:59 +0000 |
| commit | 656bba95af3950b26e9e97d86d29787d89e2b423 (patch) | |
| tree | e24596755701b1765ac8f7089109cfa0392b8e46 /src/backend/storage/ipc/standby.c | |
| parent | ff8451aa14c8513e429cbef09ddc72e79da366a5 (diff) | |
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
Diffstat (limited to 'src/backend/storage/ipc/standby.c')
| -rw-r--r-- | src/backend/storage/ipc/standby.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/backend/storage/ipc/standby.c b/src/backend/storage/ipc/standby.c index e6b1fce61e6..64030b76d61 100644 --- a/src/backend/storage/ipc/standby.c +++ b/src/backend/storage/ipc/standby.c @@ -818,7 +818,7 @@ standby_desc(StringInfo buf, uint8 xl_info, char *rec) * making WAL entries. */ void -LogStandbySnapshot(TransactionId *oldestActiveXid, TransactionId *nextXid) +LogStandbySnapshot(TransactionId *nextXid) { RunningTransactions running; xl_standby_lock *locks; @@ -848,7 +848,6 @@ LogStandbySnapshot(TransactionId *oldestActiveXid, TransactionId *nextXid) /* GetRunningTransactionData() acquired XidGenLock, we must release it */ LWLockRelease(XidGenLock); - *oldestActiveXid = running->oldestRunningXid; *nextXid = running->nextXid; } |
