Skip to content

Commit

Permalink
Bring back change that got lost in refactoring. silence ReadBuffer_co…
Browse files Browse the repository at this point in the history
…mmon error. TODO: add a comment, why this is fine for zenith.
  • Loading branch information
lubennikovaav authored and tristan957 committed Nov 8, 2023
1 parent 5d40b30 commit 11dcb5f
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/backend/storage/buffer/bufmgr.c
Original file line number Diff line number Diff line change
Expand Up @@ -929,11 +929,14 @@ ReadBuffer_common(SMgrRelation smgr, char relpersistence, ForkNumber forkNum,
*/
bufBlock = isLocalBuf ? LocalBufHdrGetBlock(bufHdr) : BufHdrGetBlock(bufHdr);
if (!PageIsNew((Page) bufBlock))
ereport(ERROR,
{
// XXX-ZENITH
MemSet((char *) bufBlock, 0, BLCKSZ);
ereport(DEBUG1,
(errmsg("unexpected data beyond EOF in block %u of relation %s",
blockNum, relpath(smgr->smgr_rnode, forkNum)),
errhint("This has been seen to occur with buggy kernels; consider updating your system.")));

}
/*
* We *must* do smgrextend before succeeding, else the page will not
* be reserved by the kernel, and the next P_NEW call will decide to
Expand Down

0 comments on commit 11dcb5f

Please sign in to comment.