Skip to content

Commit c5dc624

Browse files
committed
cleanup the leftovers from page fixing via pg_ptrack_get_block()
1 parent 13a16e2 commit c5dc624

File tree

1 file changed

+3
-18
lines changed

1 file changed

+3
-18
lines changed

src/data.c

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -353,17 +353,6 @@ prepare_page(ConnectionArgs *conn_arg,
353353
Assert(false);
354354
}
355355
}
356-
357-
/*
358-
* If ptrack support is available, use it to get invalid block
359-
* instead of rereading it 99 times
360-
*/
361-
if (!page_is_valid && strict && ptrack_version_num > 0)
362-
{
363-
elog(WARNING, "File \"%s\", block %u, try to fetch via shared buffer",
364-
from_fullpath, blknum);
365-
break;
366-
}
367356
}
368357

369358
/*
@@ -385,7 +374,7 @@ prepare_page(ConnectionArgs *conn_arg,
385374
/* Error out in case of merge or backup without ptrack support;
386375
* issue warning in case of checkdb or backup with ptrack support
387376
*/
388-
if (!strict || (strict && ptrack_version_num > 0))
377+
if (!strict)
389378
elevel = WARNING;
390379

391380
if (errormsg)
@@ -396,16 +385,12 @@ prepare_page(ConnectionArgs *conn_arg,
396385
from_fullpath, blknum);
397386

398387
pg_free(errormsg);
388+
return PageIsCorrupted;
399389
}
400390

401391
/* Checkdb not going futher */
402392
if (!strict)
403-
{
404-
if (page_is_valid)
405-
return PageIsOk;
406-
else
407-
return PageIsCorrupted;
408-
}
393+
return PageIsOk;
409394
}
410395

411396
/*

0 commit comments

Comments
 (0)