init empty block when could not read page

Signed-off-by: shipixian <shipixian_yewu@cmss.chinamobile.com>
This commit is contained in:
shipixian 2023-05-04 14:30:34 +08:00
parent 3d471a8982
commit 8e128c64e0

View File

@ -810,6 +810,8 @@ int he3db_mdread_pagexlog(SMgrRelation reln, ForkNumber forknum, BlockNumber blo
(errcode_for_file_access(),
errmsg("could not read block %u in file \"%s\": %m",
blocknum, FilePathName(v->mdfd_vfd))));
if (he3mirror && nbytes == 0)
MemSet(*buffer, 0, BLCKSZ);
ereport(PANIC,
(errcode(ERRCODE_DATA_CORRUPTED),