summaryrefslogtreecommitdiff
path: root/src/backend/access/gin/ginvacuum.c
diff options
context:
space:
mode:
authorBruce Momjian2017-05-17 20:31:56 +0000
committerBruce Momjian2017-05-17 20:31:56 +0000
commita6fd7b7a5f7bf3a8aa3f3d076cf09d922c1c6dd2 (patch)
treed10454411c05d459abe06df161ab3c1156c5f477 /src/backend/access/gin/ginvacuum.c
parent8a943324780259757c77c56cfc597347d1150cdb (diff)
Post-PG 10 beta1 pgindent run
perltidy run not included.
Diffstat (limited to 'src/backend/access/gin/ginvacuum.c')
-rw-r--r--src/backend/access/gin/ginvacuum.c42
1 files changed, 21 insertions, 21 deletions
diff --git a/src/backend/access/gin/ginvacuum.c b/src/backend/access/gin/ginvacuum.c
index 26c077a7bb9..27e502a3606 100644
--- a/src/backend/access/gin/ginvacuum.c
+++ b/src/backend/access/gin/ginvacuum.c
@@ -140,9 +140,9 @@ ginDeletePage(GinVacuumState *gvs, BlockNumber deleteBlkno, BlockNumber leftBlkn
* exclusive cleanup lock. This guarantees that no insertions currently
* happen in this subtree. Caller also acquire Exclusive lock on deletable
* page and is acquiring and releasing exclusive lock on left page before.
- * Left page was locked and released. Then parent and this page are locked.
- * We acquire left page lock here only to mark page dirty after changing
- * right pointer.
+ * Left page was locked and released. Then parent and this page are
+ * locked. We acquire left page lock here only to mark page dirty after
+ * changing right pointer.
*/
lBuffer = ReadBufferExtended(gvs->index, MAIN_FORKNUM, leftBlkno,
RBM_NORMAL, gvs->strategy);
@@ -258,7 +258,7 @@ ginScanToDelete(GinVacuumState *gvs, BlockNumber blkno, bool isRoot,
buffer = ReadBufferExtended(gvs->index, MAIN_FORKNUM, blkno,
RBM_NORMAL, gvs->strategy);
- if(!isRoot)
+ if (!isRoot)
LockBuffer(buffer, GIN_EXCLUSIVE);
page = BufferGetPage(buffer);
@@ -295,8 +295,8 @@ ginScanToDelete(GinVacuumState *gvs, BlockNumber blkno, bool isRoot,
}
}
- if(!isRoot)
- LockBuffer(buffer, GIN_UNLOCK);
+ if (!isRoot)
+ LockBuffer(buffer, GIN_UNLOCK);
ReleaseBuffer(buffer);
@@ -326,7 +326,7 @@ ginVacuumPostingTreeLeaves(GinVacuumState *gvs, BlockNumber blkno, bool isRoot)
RBM_NORMAL, gvs->strategy);
page = BufferGetPage(buffer);
- ginTraverseLock(buffer,false);
+ ginTraverseLock(buffer, false);
Assert(GinPageIsData(page));
@@ -347,15 +347,15 @@ ginVacuumPostingTreeLeaves(GinVacuumState *gvs, BlockNumber blkno, bool isRoot)
}
else
{
- OffsetNumber i;
- bool hasEmptyChild = FALSE;
- bool hasNonEmptyChild = FALSE;
- OffsetNumber maxoff = GinPageGetOpaque(page)->maxoff;
- BlockNumber* children = palloc(sizeof(BlockNumber) * (maxoff + 1));
+ OffsetNumber i;
+ bool hasEmptyChild = FALSE;
+ bool hasNonEmptyChild = FALSE;
+ OffsetNumber maxoff = GinPageGetOpaque(page)->maxoff;
+ BlockNumber *children = palloc(sizeof(BlockNumber) * (maxoff + 1));
/*
- * Read all children BlockNumbers.
- * Not sure it is safe if there are many concurrent vacuums.
+ * Read all children BlockNumbers. Not sure it is safe if there are
+ * many concurrent vacuums.
*/
for (i = FirstOffsetNumber; i <= maxoff; i++)
@@ -380,26 +380,26 @@ ginVacuumPostingTreeLeaves(GinVacuumState *gvs, BlockNumber blkno, bool isRoot)
vacuum_delay_point();
/*
- * 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.
+ * 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)
+ if (hasEmptyChild && !hasNonEmptyChild && !isRoot)
return TRUE;
- if(hasEmptyChild)
+ if (hasEmptyChild)
{
DataPageDeleteStack root,
*ptr,
*tmp;
buffer = ReadBufferExtended(gvs->index, MAIN_FORKNUM, blkno,
- RBM_NORMAL, gvs->strategy);
+ RBM_NORMAL, gvs->strategy);
LockBufferForCleanup(buffer);
memset(&root, 0, sizeof(DataPageDeleteStack));
- root.leftBlkno = InvalidBlockNumber;
- root.isRoot = TRUE;
+ root.leftBlkno = InvalidBlockNumber;
+ root.isRoot = TRUE;
ginScanToDelete(gvs, blkno, TRUE, &root, InvalidOffsetNumber);