Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 11c730f

Browse files
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
1 parent 6182e01 commit 11c730f

File tree

1 file changed

+1
-1
lines changed
  • src/backend/access/transam

1 file changed

+1
-1
lines changed

src/backend/access/transam/xlog.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6451,7 +6451,7 @@ StartupXLOG(void)
64516451
*/
64526452
SpinLockAcquire(&xlogctl->info_lck);
64536453
xlogctl->replayEndRecPtr = ReadRecPtr;
6454-
xlogctl->recoveryLastRecPtr = ReadRecPtr;
6454+
xlogctl->recoveryLastRecPtr = EndRecPtr;
64556455
xlogctl->recoveryLastXTime = 0;
64566456
xlogctl->recoveryPause = false;
64576457
SpinLockRelease(&xlogctl->info_lck);

0 commit comments

Comments
 (0)