Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 588f50f

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 bafe3b0 commit 588f50f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/backend/access/spgist/spgvacuum.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -653,7 +653,7 @@ spgvacuumpage(spgBulkDeleteState *bds, BlockNumber blkno)
653653
*/
654654
if (!SpGistBlockIsRoot(blkno))
655655
{
656-
if (PageIsEmpty(page))
656+
if (PageIsNew(page) || PageIsEmpty(page))
657657
{
658658
RecordFreeIndexPage(index, blkno);
659659
bds->stats->pages_deleted++;

0 commit comments

Comments
 (0)