aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>1999-11-28 01:58:08 +0000
committerTom Lane <tgl@sss.pgh.pa.us>1999-11-28 01:58:08 +0000
commit0ffe17aec61a14d27625899c221862651a502ab7 (patch)
tree6a6138d980c9af9c9126246f0fc036c207751611 /src
parentb982c3b683570101eaff1623ef0eb234b79c0c64 (diff)
downloadpostgresql-0ffe17aec61a14d27625899c221862651a502ab7.tar.gz
postgresql-0ffe17aec61a14d27625899c221862651a502ab7.zip
lmgr.c didn't check for failure return from LockAcquire(). Boo hiss.
Diffstat (limited to 'src')
-rw-r--r--src/backend/storage/lmgr/lmgr.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/backend/storage/lmgr/lmgr.c b/src/backend/storage/lmgr/lmgr.c
index 86834f5d883..6d07595ad19 100644
--- a/src/backend/storage/lmgr/lmgr.c
+++ b/src/backend/storage/lmgr/lmgr.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/storage/lmgr/lmgr.c,v 1.36 1999/11/17 23:51:21 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/storage/lmgr/lmgr.c,v 1.37 1999/11/28 01:58:08 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -144,7 +144,8 @@ LockRelation(Relation relation, LOCKMODE lockmode)
tag.dbId = relation->rd_lockInfo.lockRelId.dbId;
tag.objId.blkno = InvalidBlockNumber;
- LockAcquire(LockTableId, &tag, lockmode);
+ if (! LockAcquire(LockTableId, &tag, lockmode))
+ elog(ERROR, "LockRelation: LockAcquire failed");
/*
* Check to see if the relcache entry has been invalidated
@@ -192,7 +193,8 @@ LockPage(Relation relation, BlockNumber blkno, LOCKMODE lockmode)
tag.dbId = relation->rd_lockInfo.lockRelId.dbId;
tag.objId.blkno = blkno;
- LockAcquire(LockTableId, &tag, lockmode);
+ if (! LockAcquire(LockTableId, &tag, lockmode))
+ elog(ERROR, "LockPage: LockAcquire failed");
}
/*
@@ -227,7 +229,8 @@ XactLockTableInsert(TransactionId xid)
tag.dbId = InvalidOid;
tag.objId.xid = xid;
- LockAcquire(LockTableId, &tag, ExclusiveLock);
+ if (! LockAcquire(LockTableId, &tag, ExclusiveLock))
+ elog(ERROR, "XactLockTableInsert: LockAcquire failed");
}
void
@@ -259,7 +262,9 @@ XactLockTableWait(TransactionId xid)
tag.dbId = InvalidOid;
tag.objId.xid = xid;
- LockAcquire(LockTableId, &tag, ShareLock);
+ if (! LockAcquire(LockTableId, &tag, ShareLock))
+ elog(ERROR, "XactLockTableWait: LockAcquire failed");
+
LockRelease(LockTableId, &tag, ShareLock);
/*