slave support cross-timeline connect to new primary

This commit is contained in:
wangyao 2023-06-01 08:50:46 +00:00 committed by Gitee
commit e4c6e686e5
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -14675,7 +14675,7 @@ producerXLogParallelBatchRead(XLogReaderState *xlogreader, XLogRecPtr startPtr,
if (!WaitForWALToBecomeAvailable(readedUpto + reqLen,
private->randAccess,
private->fetching_ckpt,
startPtr))
readedUpto))
{
readLen = 0;
readSource = XLOG_FROM_ANY;
@ -15062,6 +15062,7 @@ WaitForWALToBecomeAvailable(XLogRecPtr RecPtr, bool randAccess,
tli, curFileTLI);
}
curFileTLI = tli;
ThisTimeLineID = tli;
RequestXLogStreaming(tli, ptr, PrimaryConnInfo,
PrimarySlotName,
wal_receiver_create_temp_slot);