mirror of
https://git.postgresql.org/git/postgresql.git
synced 2025-03-13 19:57:53 +08:00
Fix bug in streaming replication over multiple tli switches.
After receiving some WAL over streaming replication, try to open the file from the timeline we're currently recieving, not recoveryTargetTLI. They are usually the same, which is why wasn't noticed before, but you'd get an error if there have been more than one timeline switch between the current point in WAL and the recovery target.
This commit is contained in:
parent
4ffd589f44
commit
d194d7a526
@ -9745,7 +9745,7 @@ WaitForWALToBecomeAvailable(XLogRecPtr RecPtr, bool randAccess,
|
||||
if (readFile < 0)
|
||||
{
|
||||
readFile = XLogFileRead(readSegNo, PANIC,
|
||||
recoveryTargetTLI,
|
||||
receiveTLI,
|
||||
XLOG_FROM_STREAM, false);
|
||||
Assert(readFile >= 0);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user