Skip to content

Commit 315cb2f

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 e0eb632 commit 315cb2f

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
@@ -6134,7 +6134,7 @@ StartupXLOG(void)
61346134
*/
61356135
SpinLockAcquire(&xlogctl->info_lck);
61366136
xlogctl->replayEndRecPtr = ReadRecPtr;
6137-
xlogctl->recoveryLastRecPtr = ReadRecPtr;
6137+
xlogctl->recoveryLastRecPtr = EndRecPtr;
61386138
xlogctl->recoveryLastXTime = 0;
61396139
SpinLockRelease(&xlogctl->info_lck);
61406140

0 commit comments

Comments
 (0)