Skip to content

Commit 10ac3c9

Browse files
committed
[PBCKP-402] bound check for abortedRecPtr to Pg15
It is not really needed in previous versions. It doesn't harm, but we want to reduce tests amount.
1 parent 24f12d9 commit 10ac3c9

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Diff for: src/parsexlog.c

+4
Original file line numberDiff line numberDiff line change
@@ -1439,6 +1439,7 @@ XLogThreadWorker(void *arg)
14391439
* Usually SimpleXLogPageRead() does it by itself. But here we need
14401440
* to do it manually to support threads.
14411441
*/
1442+
#if PG_VERSION_NUM >= 150000
14421443
if (reader_data->need_switch && (
14431444
errormsg == NULL ||
14441445
/*
@@ -1447,6 +1448,9 @@ XLogThreadWorker(void *arg)
14471448
* But we continue as we did with bug present in Pg < 15.
14481449
*/
14491450
!XLogRecPtrIsInvalid(xlogreader->abortedRecPtr)))
1451+
#else
1452+
if (reader_data->need_switch && errormsg == NULL)
1453+
#endif
14501454
{
14511455
if (SwitchThreadToNextWal(xlogreader, thread_arg))
14521456
continue;

0 commit comments

Comments
 (0)