1
0
mirror of https://github.com/postgrespro/pg_probackup.git synced 2026-06-21 01:34:15 +02:00

cleanup xlogreader in SwitchThreadtoNextWal so we don't need to seek back

This commit is contained in:
Yura Sokolov
2022-12-12 10:36:06 +03:00
parent 81f1ed2293
commit d582627366
+3 -4
View File
@@ -1461,10 +1461,7 @@ XLogThreadWorker(void *arg)
*/
strncmp(errormsg, "missing contrecord", 18) == 0))
{
if (SwitchThreadToNextWal(xlogreader, thread_arg))
continue;
else
break;
continue;
}
/*
@@ -1649,6 +1646,8 @@ SwitchThreadToNextWal(XLogReaderState *xlogreader, xlog_thread_arg *arg)
PrintXLogCorruptionMsg(reader_data, ERROR);
}
arg->startpoint = found;
/* Reset xlog reader therefore we don't have to seek back */
CleanupXLogPageRead(xlogreader);
elog(VERBOSE, "Thread [%d]: Switched to LSN %X/%X",
reader_data->thread_num,