Skip to content

Commit 9c88e06

Browse files
committed
Don't assume that PageIsEmpty() returns true on an all-zeros page.
It does currently, and I don't see us changing that any time soon, but we don't make that assumption anywhere else. Per Tom Lane's suggestion. Backpatch to 9.2, like the previous patch that added this assumption.
1 parent 03a0a35 commit 9c88e06

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/backend/access/spgist/spgvacuum.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -655,7 +655,7 @@ spgvacuumpage(spgBulkDeleteState *bds, BlockNumber blkno)
655655
*/
656656
if (!SpGistBlockIsRoot(blkno))
657657
{
658-
if (PageIsEmpty(page))
658+
if (PageIsNew(page) || PageIsEmpty(page))
659659
{
660660
RecordFreeIndexPage(index, blkno);
661661
bds->stats->pages_deleted++;

0 commit comments

Comments
 (0)