Skip to content

Commit 5530623

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 3f1787c commit 5530623

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
@@ -6407,7 +6407,7 @@ StartupXLOG(void)
64076407
*/
64086408
SpinLockAcquire(&xlogctl->info_lck);
64096409
xlogctl->replayEndRecPtr = ReadRecPtr;
6410-
xlogctl->recoveryLastRecPtr = ReadRecPtr;
6410+
xlogctl->recoveryLastRecPtr = EndRecPtr;
64116411
xlogctl->recoveryLastXTime = 0;
64126412
xlogctl->currentChunkStartTime = 0;
64136413
xlogctl->recoveryPause = false;

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy