Correctly initialise shared recoveryLastRecPtr in recovery.

Previously we used ReadRecPtr rather than EndRecPtr, which was
not a serious error but caused pg_stat_replication to report
incorrect replay_location until at least one WAL record is replayed.

Fujii Masao
This commit is contained in:
Simon Riggs 2012-01-13 13:02:44 +00:00
parent 3f1787c253
commit 5530623d03
1 changed files with 1 additions and 1 deletions

View File

@ -6407,7 +6407,7 @@ StartupXLOG(void)
*/
SpinLockAcquire(&xlogctl->info_lck);
xlogctl->replayEndRecPtr = ReadRecPtr;
xlogctl->recoveryLastRecPtr = ReadRecPtr;
xlogctl->recoveryLastRecPtr = EndRecPtr;
xlogctl->recoveryLastXTime = 0;
xlogctl->currentChunkStartTime = 0;
xlogctl->recoveryPause = false;