aboutsummaryrefslogtreecommitdiff
path: root/src/backend/commands/vacuum.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/commands/vacuum.c')
-rw-r--r--src/backend/commands/vacuum.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/backend/commands/vacuum.c b/src/backend/commands/vacuum.c
index f7bed005add..608dd729ffa 100644
--- a/src/backend/commands/vacuum.c
+++ b/src/backend/commands/vacuum.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/commands/vacuum.c,v 1.91 1998/11/27 19:51:58 vadim Exp $
+ * $Header: /cvsroot/pgsql/src/backend/commands/vacuum.c,v 1.92 1998/12/15 12:46:01 vadim Exp $
*
*-------------------------------------------------------------------------
*/
@@ -497,7 +497,7 @@ vc_vacone(Oid relid, bool analyze, List *va_cols)
}
/* we require the relation to be locked until the indices are cleaned */
- RelationSetLockForWrite(onerel);
+ LockRelation(onerel, AccessExclusiveLock);
/* scan it */
vacuum_pages.vpl_num_pages = fraged_pages.vpl_num_pages = 0;
@@ -1918,7 +1918,7 @@ vc_delhilowstats(Oid relid, int attcnt, int *attnums)
if (i >= attcnt)
continue; /* don't delete it */
}
- heap_delete(pgstatistic, &tuple->t_self);
+ heap_delete(pgstatistic, &tuple->t_self, NULL);
}
heap_endscan(scan);
@@ -1928,11 +1928,7 @@ vc_delhilowstats(Oid relid, int attcnt, int *attnums)
static void
vc_setpagelock(Relation rel, BlockNumber blkno)
{
- ItemPointerData itm;
-
- ItemPointerSet(&itm, blkno, 1);
-
- RelationSetLockForWritePage(rel, &itm);
+ LockPage(rel, blkno, ExclusiveLock);
}
/*