Skip to content

Commit 24f12d9

Browse files
committed
[PBCKP-402,PBCKP-354] refix "missing contrecord" detection.
Error message is translated according to current locale. So we can't compare it as a string. But `abortedRecPtr` exists exactly for this case, so we can rely on it.
1 parent 9391a1b commit 24f12d9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: src/parsexlog.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1446,7 +1446,7 @@ XLogThreadWorker(void *arg)
14461446
* TODO: probably we should abort reading logs at this moment.
14471447
* But we continue as we did with bug present in Pg < 15.
14481448
*/
1449-
strncmp(errormsg, "missing contrecord", 18) == 0))
1449+
!XLogRecPtrIsInvalid(xlogreader->abortedRecPtr)))
14501450
{
14511451
if (SwitchThreadToNextWal(xlogreader, thread_arg))
14521452
continue;

0 commit comments

Comments
 (0)