fix add bufferinvaild jug

This commit is contained in:
cchen676 2021-06-18 16:37:48 +08:00
parent 74a53a08c2
commit ed81aff7ea
1 changed files with 4 additions and 0 deletions

View File

@ -191,6 +191,10 @@ int StandbyReadPageforPrimary(uint32 spcnode, uint32 dbnode, uint32 relnode, int
/* read page, if PageIsVerified failed will long jump to PG_CATCH() */
Buffer buf = ReadBufferForRemote(relfilenode, forknum, blocknum, RBM_FOR_REMOTE, NULL, &hit);
if (BufferIsInvalid(buf)) {
ereport(ERROR, (errmodule(MOD_REMOTE), errmsg("standby page buffer is invalid!")));
return REMOTE_READ_BLCKSZ_NOT_SAME;
}
LockBuffer(buf, BUFFER_LOCK_SHARE);
Block block = BufferGetBlock(buf);