Skip to content

[PBCKP-354] Pg15: continue reading if error "missing contrecord" is met. #576

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 29, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion src/parsexlog.c
Original file line number Diff line number Diff line change
Expand Up @@ -1443,7 +1443,14 @@ XLogThreadWorker(void *arg)
* Usually SimpleXLogPageRead() does it by itself. But here we need
* to do it manually to support threads.
*/
if (reader_data->need_switch && errormsg == NULL)
if (reader_data->need_switch && (
errormsg == NULL ||
/*
* Pg15 now informs if "contrecord" is missing.
* TODO: probably we should abort reading logs at this moment.
* But we continue as we did with bug present in Pg < 15.
*/
strncmp(errormsg, "missing contrecord", 18) == 0))
{
if (SwitchThreadToNextWal(xlogreader, thread_arg))
continue;
Expand Down