mirror of https://github.com/postgres/postgres
lmgr.c didn't check for failure return from LockAcquire(). Boo hiss.
This commit is contained in:
parent
b982c3b683
commit
0ffe17aec6
|
@ -7,7 +7,7 @@
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* 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.dbId = relation->rd_lockInfo.lockRelId.dbId;
|
||||||
tag.objId.blkno = InvalidBlockNumber;
|
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
|
* 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.dbId = relation->rd_lockInfo.lockRelId.dbId;
|
||||||
tag.objId.blkno = blkno;
|
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.dbId = InvalidOid;
|
||||||
tag.objId.xid = xid;
|
tag.objId.xid = xid;
|
||||||
|
|
||||||
LockAcquire(LockTableId, &tag, ExclusiveLock);
|
if (! LockAcquire(LockTableId, &tag, ExclusiveLock))
|
||||||
|
elog(ERROR, "XactLockTableInsert: LockAcquire failed");
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -259,7 +262,9 @@ XactLockTableWait(TransactionId xid)
|
||||||
tag.dbId = InvalidOid;
|
tag.dbId = InvalidOid;
|
||||||
tag.objId.xid = xid;
|
tag.objId.xid = xid;
|
||||||
|
|
||||||
LockAcquire(LockTableId, &tag, ShareLock);
|
if (! LockAcquire(LockTableId, &tag, ShareLock))
|
||||||
|
elog(ERROR, "XactLockTableWait: LockAcquire failed");
|
||||||
|
|
||||||
LockRelease(LockTableId, &tag, ShareLock);
|
LockRelease(LockTableId, &tag, ShareLock);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in New Issue