Skip to content

Commit

Permalink
Fix entering hot standby mode for Neon
Browse files Browse the repository at this point in the history
  • Loading branch information
lubennikovaav authored and MMeent committed May 11, 2023
1 parent cf9ce82 commit 1984832
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/backend/access/transam/xlogrecovery.c
Original file line number Diff line number Diff line change
Expand Up @@ -1135,7 +1135,7 @@ readRecoverySignalFile(void)
if (standby_signal_file_found)
{
StandbyModeRequested = true;
ArchiveRecoveryRequested = XLogRecPtrIsInvalid(zenithLastRec); /* no need to perform WAL recovery in Neon */
ArchiveRecoveryRequested = true;
}
else if (recovery_signal_file_found)
{
Expand Down Expand Up @@ -1786,7 +1786,10 @@ PerformWalRecovery(void)
else
{
/* just have to read next record after CheckPoint */
Assert(xlogreader->ReadRecPtr == CheckPointLoc);
if (ZenithRecoveryRequested)
xlogreader->ReadRecPtr = CheckPointLoc;
else
Assert(xlogreader->ReadRecPtr == CheckPointLoc);
replayTLI = CheckPointTLI;
record = ReadRecord(xlogprefetcher, LOG, false, replayTLI);
}
Expand Down

0 comments on commit 1984832

Please sign in to comment.