mirror of
https://github.com/postgres/postgres.git
synced 2025-06-14 18:42:34 +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:
@ -6451,7 +6451,7 @@ StartupXLOG(void)
|
||||
*/
|
||||
SpinLockAcquire(&xlogctl->info_lck);
|
||||
xlogctl->replayEndRecPtr = ReadRecPtr;
|
||||
xlogctl->recoveryLastRecPtr = ReadRecPtr;
|
||||
xlogctl->recoveryLastRecPtr = EndRecPtr;
|
||||
xlogctl->recoveryLastXTime = 0;
|
||||
xlogctl->recoveryPause = false;
|
||||
SpinLockRelease(&xlogctl->info_lck);
|
||||
|
Reference in New Issue
Block a user