1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-20 05:03:10 +03:00

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-02-22 13:55:04 +00:00
parent e0eb63238a
commit 315cb2f967

View File

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