projects
/
postgresql.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
03a0a35
)
Don't assume that PageIsEmpty() returns true on an all-zeros page.
author
Heikki Linnakangas
Mon, 27 Jul 2015 15:54:09 +0000
(18:54 +0300)
committer
Heikki Linnakangas
Mon, 27 Jul 2015 15:54:27 +0000
(18:54 +0300)
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.
src/backend/access/spgist/spgvacuum.c
patch
|
blob
|
blame
|
history
diff --git
a/src/backend/access/spgist/spgvacuum.c
b/src/backend/access/spgist/spgvacuum.c
index d40da0eeccad20596f2082c94089965c9004df29..06c0b0af7eedcbb530e78b508a6ca6c1afabd79e 100644
(file)
--- a/
src/backend/access/spgist/spgvacuum.c
+++ b/
src/backend/access/spgist/spgvacuum.c
@@
-655,7
+655,7
@@
spgvacuumpage(spgBulkDeleteState *bds, BlockNumber blkno)
*/
if (!SpGistBlockIsRoot(blkno))
{
- if (PageIsEmpty(page))
+ if (PageIs
New(page) || PageIs
Empty(page))
{
RecordFreeIndexPage(index, blkno);
bds->stats->pages_deleted++;