aboutsummaryrefslogtreecommitdiff
path: root/src/backend/access/gist/gistvacuum.c
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2006-02-11 17:14:09 +0000
committerBruce Momjian <bruce@momjian.us>2006-02-11 17:14:09 +0000
commit77bb65d3fcdd2b588cec4b94af05e3d3f30e80cc (patch)
tree36929633459fe21c8eae3a03bfcdb1e1e5a6511d /src/backend/access/gist/gistvacuum.c
parentbf324946b32736da1b128b1e742515879b42a4e8 (diff)
downloadpostgresql-77bb65d3fcdd2b588cec4b94af05e3d3f30e80cc.tar.gz
postgresql-77bb65d3fcdd2b588cec4b94af05e3d3f30e80cc.zip
Revert based on Tom's recommendation:
> Allow VACUUM to complete faster by avoiding scanning the indexes when no > rows were removed from the heap by the VACUUM.
Diffstat (limited to 'src/backend/access/gist/gistvacuum.c')
-rw-r--r--src/backend/access/gist/gistvacuum.c19
1 files changed, 7 insertions, 12 deletions
diff --git a/src/backend/access/gist/gistvacuum.c b/src/backend/access/gist/gistvacuum.c
index 10bd6cb4dc1..afd743a5a26 100644
--- a/src/backend/access/gist/gistvacuum.c
+++ b/src/backend/access/gist/gistvacuum.c
@@ -8,7 +8,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/access/gist/gistvacuum.c,v 1.12 2006/02/11 16:59:08 momjian Exp $
+ * $PostgreSQL: pgsql/src/backend/access/gist/gistvacuum.c,v 1.13 2006/02/11 17:14:08 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -125,7 +125,7 @@ gistVacuumUpdate(GistVacuum *gv, BlockNumber blkno, bool needunion)
if (chldtuple.ituplen > 1)
{
/*
- * child was split, so we need mark completion
+ * child was splitted, so we need mark completion
* insert(split)
*/
int j;
@@ -329,9 +329,9 @@ gistVacuumUpdate(GistVacuum *gv, BlockNumber blkno, bool needunion)
}
/*
- * For usual vacuum just update FSM, for full vacuum
+ * For usial vacuum just update FSM, for full vacuum
* reforms parent tuples if some of childs was deleted or changed,
- * update invalid tuples (they can exist from last crash recovery only),
+ * update invalid tuples (they can exsist from last crash recovery only),
* tries to get smaller index
*/
@@ -505,15 +505,10 @@ gistbulkdelete(PG_FUNCTION_ARGS)
*ptr;
bool needLock;
- if (callback_state)
- {
- stack = (GistBDItem *) palloc0(sizeof(GistBDItem));
+ stack = (GistBDItem *) palloc0(sizeof(GistBDItem));
- stack->blkno = GIST_ROOT_BLKNO;
- needFullVacuum = false;
- }
- else
- stack = NULL;
+ stack->blkno = GIST_ROOT_BLKNO;
+ needFullVacuum = false;
while (stack)
{