diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2000-12-20 22:54:02 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2000-12-20 22:54:02 +0000 |
commit | e6e9e18e9ed17a5070c996881ec5e3deb8c31324 (patch) | |
tree | 9fb184231bfeeaaa5341f2d596bba80b96c2282a /src/backend/storage/lmgr/single.c | |
parent | 39b547f43006938e93bd781ccef6f8c3610b9509 (diff) |
Remove multi.c and single.c, which have been dead code for
over two years.
Diffstat (limited to 'src/backend/storage/lmgr/single.c')
-rw-r--r-- | src/backend/storage/lmgr/single.c | 86 |
1 files changed, 0 insertions, 86 deletions
diff --git a/src/backend/storage/lmgr/single.c b/src/backend/storage/lmgr/single.c deleted file mode 100644 index 44c0875de62..00000000000 --- a/src/backend/storage/lmgr/single.c +++ /dev/null @@ -1,86 +0,0 @@ -/*------------------------------------------------------------------------- - * - * single.c - * set single locks in the multi-level lock hierarchy - * - * Sometimes we don't want to set all levels of the multi-level - * lock hierarchy at once. This allows us to set and release - * one level at a time. It's useful in index scans when - * you can set an intent lock at the beginning and thereafter - * only set page locks. Tends to speed things up. - * - * Portions Copyright (c) 1996-2000, PostgreSQL, Inc - * Portions Copyright (c) 1994, Regents of the University of California - * - * - * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/storage/lmgr/Attic/single.c,v 1.13 2000/01/26 05:57:02 momjian Exp $ - * - *------------------------------------------------------------------------- - */ - -#include "postgres.h" - -#include "storage/lmgr.h" -#include "storage/lock.h" -#include "storage/multilev.h" -#include "utils/rel.h" - -/* - * SingleLockReln -- lock a relation - * - * Returns: TRUE if the lock can be set, FALSE otherwise. - */ -bool -SingleLockReln(LockInfo lockinfo, LOCKMODE lockmode, int action) -{ - LOCKTAG tag; - - /* - * LOCKTAG has two bytes of padding, unfortunately. The hash function - * will return miss if the padding bytes aren't zero'd. - */ - MemSet(&tag, 0, sizeof(tag)); - tag.relId = lockinfo->lockRelId.relId; - tag.dbId = lockinfo->lockRelId.dbId; - BlockIdSet(&(tag.tupleId.ip_blkid), InvalidBlockNumber); - tag.tupleId.ip_posid = InvalidOffsetNumber; - - if (action == UNLOCK) - return LockRelease(MultiTableId, &tag, lockmode); - else - return LockAcquire(MultiTableId, &tag, lockmode); -} - -/* - * SingleLockPage -- use multi-level lock table, but lock - * only at the page level. - * - * Assumes that an INTENT lock has already been set in the - * multi-level lock table. - * - */ -bool -SingleLockPage(LockInfo lockinfo, - ItemPointer tidPtr, - LOCKMODE lockmode, - int action) -{ - LOCKTAG tag; - - /* - * LOCKTAG has two bytes of padding, unfortunately. The hash function - * will return miss if the padding bytes aren't zero'd. - */ - MemSet(&tag, 0, sizeof(tag)); - tag.relId = lockinfo->lockRelId.relId; - tag.dbId = lockinfo->lockRelId.dbId; - BlockIdCopy(&(tag.tupleId.ip_blkid), &(tidPtr->ip_blkid)); - tag.tupleId.ip_posid = InvalidOffsetNumber; - - - if (action == UNLOCK) - return LockRelease(MultiTableId, &tag, lockmode); - else - return LockAcquire(MultiTableId, &tag, lockmode); -} |