diff options
Diffstat (limited to 'src/backend/access/gin/ginvacuum.c')
-rw-r--r-- | src/backend/access/gin/ginvacuum.c | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/src/backend/access/gin/ginvacuum.c b/src/backend/access/gin/ginvacuum.c index 31425e9963e..a20a99c8140 100644 --- a/src/backend/access/gin/ginvacuum.c +++ b/src/backend/access/gin/ginvacuum.c @@ -235,7 +235,7 @@ ginScanToDelete(GinVacuumState *gvs, BlockNumber blkno, bool isRoot, DataPageDeleteStack *me; Buffer buffer; Page page; - bool meDelete = FALSE; + bool meDelete = false; bool isempty; if (isRoot) @@ -274,7 +274,7 @@ ginScanToDelete(GinVacuumState *gvs, BlockNumber blkno, bool isRoot, { PostingItem *pitem = GinDataPageGetPostingItem(page, i); - if (ginScanToDelete(gvs, PostingItemGetBlockNumber(pitem), FALSE, me, i)) + if (ginScanToDelete(gvs, PostingItemGetBlockNumber(pitem), false, me, i)) i--; } } @@ -291,7 +291,7 @@ ginScanToDelete(GinVacuumState *gvs, BlockNumber blkno, bool isRoot, { Assert(!isRoot); ginDeletePage(gvs, blkno, me->leftBlkno, me->parent->blkno, myoff, me->parent->isRoot); - meDelete = TRUE; + meDelete = true; } } @@ -319,7 +319,7 @@ ginVacuumPostingTreeLeaves(GinVacuumState *gvs, BlockNumber blkno, bool isRoot) { Buffer buffer; Page page; - bool hasVoidPage = FALSE; + bool hasVoidPage = false; MemoryContext oldCxt; buffer = ReadBufferExtended(gvs->index, MAIN_FORKNUM, blkno, @@ -339,7 +339,7 @@ ginVacuumPostingTreeLeaves(GinVacuumState *gvs, BlockNumber blkno, bool isRoot) /* if root is a leaf page, we don't desire further processing */ if (GinDataLeafPageIsEmpty(page)) - hasVoidPage = TRUE; + hasVoidPage = true; UnlockReleaseBuffer(buffer); @@ -348,8 +348,8 @@ ginVacuumPostingTreeLeaves(GinVacuumState *gvs, BlockNumber blkno, bool isRoot) else { OffsetNumber i; - bool hasEmptyChild = FALSE; - bool hasNonEmptyChild = FALSE; + bool hasEmptyChild = false; + bool hasNonEmptyChild = false; OffsetNumber maxoff = GinPageGetOpaque(page)->maxoff; BlockNumber *children = palloc(sizeof(BlockNumber) * (maxoff + 1)); @@ -369,10 +369,10 @@ ginVacuumPostingTreeLeaves(GinVacuumState *gvs, BlockNumber blkno, bool isRoot) for (i = FirstOffsetNumber; i <= maxoff; i++) { - if (ginVacuumPostingTreeLeaves(gvs, children[i], FALSE)) - hasEmptyChild = TRUE; + if (ginVacuumPostingTreeLeaves(gvs, children[i], false)) + hasEmptyChild = true; else - hasNonEmptyChild = TRUE; + hasNonEmptyChild = true; } pfree(children); @@ -380,12 +380,12 @@ ginVacuumPostingTreeLeaves(GinVacuumState *gvs, BlockNumber blkno, bool isRoot) vacuum_delay_point(); /* - * All subtree is empty - just return TRUE to indicate that parent + * All subtree is empty - just return true to indicate that parent * must do a cleanup. Unless we are ROOT an there is way to go upper. */ if (hasEmptyChild && !hasNonEmptyChild && !isRoot) - return TRUE; + return true; if (hasEmptyChild) { @@ -399,9 +399,9 @@ ginVacuumPostingTreeLeaves(GinVacuumState *gvs, BlockNumber blkno, bool isRoot) memset(&root, 0, sizeof(DataPageDeleteStack)); root.leftBlkno = InvalidBlockNumber; - root.isRoot = TRUE; + root.isRoot = true; - ginScanToDelete(gvs, blkno, TRUE, &root, InvalidOffsetNumber); + ginScanToDelete(gvs, blkno, true, &root, InvalidOffsetNumber); ptr = root.child; @@ -416,14 +416,14 @@ ginVacuumPostingTreeLeaves(GinVacuumState *gvs, BlockNumber blkno, bool isRoot) } /* Here we have deleted all empty subtrees */ - return FALSE; + return false; } } static void ginVacuumPostingTree(GinVacuumState *gvs, BlockNumber rootBlkno) { - ginVacuumPostingTreeLeaves(gvs, rootBlkno, TRUE); + ginVacuumPostingTreeLeaves(gvs, rootBlkno, true); } /* |