Skip to content

Commit 0e98ad0

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 746e7f1 commit 0e98ad0

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
@@ -652,7 +652,7 @@ spgvacuumpage(spgBulkDeleteState *bds, BlockNumber blkno)
652652
*/
653653
if (!SpGistBlockIsRoot(blkno))
654654
{
655-
if (PageIsEmpty(page))
655+
if (PageIsNew(page) || PageIsEmpty(page))
656656
{
657657
RecordFreeIndexPage(index, blkno);
658658
bds->stats->pages_deleted++;

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy