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:
parent
3f1787c253
commit
5530623d03
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user