Content-Length: 258936 | pFad | http://github.com/postgrespro/postgres/commit/d194d7a52630d855f43edbf0129e131099af6c14

64 Fix bug in streaming replication over multiple tli switches. · postgrespro/postgres@d194d7a · GitHub
Skip to content

Commit d194d7a

Browse files
committed
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.
1 parent 4ffd589 commit d194d7a

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
@@ -9745,7 +9745,7 @@ WaitForWALToBecomeAvailable(XLogRecPtr RecPtr, bool randAccess,
97459745
if (readFile < 0)
97469746
{
97479747
readFile = XLogFileRead(readSegNo, PANIC,
9748-
recoveryTargetTLI,
9748+
receiveTLI,
97499749
XLOG_FROM_STREAM, false);
97509750
Assert(readFile >= 0);
97519751
}

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres/commit/d194d7a52630d855f43edbf0129e131099af6c14

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy