mirror of
https://github.com/postgres/postgres.git
synced 2025-06-18 00:02:37 -04:00
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.
This commit is contained in:
parent
bafe3b0073
commit
588f50f851
@ -653,7 +653,7 @@ spgvacuumpage(spgBulkDeleteState *bds, BlockNumber blkno)
|
||||
*/
|
||||
if (!SpGistBlockIsRoot(blkno))
|
||||
{
|
||||
if (PageIsEmpty(page))
|
||||
if (PageIsNew(page) || PageIsEmpty(page))
|
||||
{
|
||||
RecordFreeIndexPage(index, blkno);
|
||||
bds->stats->pages_deleted++;
|
||||
|
Loading…
x
Reference in New Issue
Block a user