Content-Length: 259186 | pFad | http://github.com/postgrespro/postgres/commit/820d1ced1b308702b3f811647810b4030f974d89

C8 Don't assume that PageIsEmpty() returns true on an all-zeros page. · postgrespro/postgres@820d1ce · GitHub
Skip to content

Commit 820d1ce

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 61a65c5 commit 820d1ce

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
@@ -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)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres/commit/820d1ced1b308702b3f811647810b4030f974d89

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy