mirror of
https://github.com/postgres/postgres.git
synced 2025-05-03 22:24:49 +03:00
Avoid calling PageGetSpecialPointer() on an all-zeros page.
That was otherwise harmless, but tripped the new assertion in PageGetSpecialPointer(). Reported by Amit Langote. Backpatch to 9.5, where the assertion was added.
This commit is contained in:
parent
dd20a97219
commit
6a0a388c20
@ -881,7 +881,7 @@ btvacuumpage(BTVacState *vstate, BlockNumber blkno, BlockNumber orig_blkno)
|
||||
BlockNumber recurse_to;
|
||||
Buffer buf;
|
||||
Page page;
|
||||
BTPageOpaque opaque;
|
||||
BTPageOpaque opaque = NULL;
|
||||
|
||||
restart:
|
||||
delete_now = false;
|
||||
@ -900,9 +900,11 @@ restart:
|
||||
info->strategy);
|
||||
LockBuffer(buf, BT_READ);
|
||||
page = BufferGetPage(buf);
|
||||
opaque = (BTPageOpaque) PageGetSpecialPointer(page);
|
||||
if (!PageIsNew(page))
|
||||
{
|
||||
_bt_checkpage(rel, buf);
|
||||
opaque = (BTPageOpaque) PageGetSpecialPointer(page);
|
||||
}
|
||||
|
||||
/*
|
||||
* If we are recursing, the only case we want to do anything with is a
|
||||
|
Loading…
x
Reference in New Issue
Block a user