mirror of
https://github.com/postgres/postgres.git
synced 2025-09-02 04:21:28 +03:00
Initial MVCC code.
New code for locking buffer' context.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user