mirror of
https://github.com/postgres/postgres.git
synced 2025-10-29 22:49:41 +03:00
- Modifies LOCKTAG to include a 'classId'. Relation receive a classId of
RelOid_pg_class, and transaction locks XactLockTableId. RelId is renamed to objId. - LockObject() and UnlockObject() functions created, and their use sprinkled throughout the code to do descent locking for domains and types. They accept lock modes AccessShare and AccessExclusive, as we only really need a 'read' and 'write' lock at the moment. Most locking cases are held until the end of the transaction. This fixes the cases Tom mentioned earlier in regards to locking with Domains. If the patch is good, I'll work on cleaning up issues with other database objects that have this problem (most of them). Rod Taylor
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
* Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $Id: lock.h,v 1.69 2003/02/18 02:13:24 momjian Exp $
|
||||
* $Id: lock.h,v 1.70 2003/02/19 04:02:54 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -100,13 +100,14 @@ typedef struct LOCKMETHODTABLE
|
||||
*/
|
||||
typedef struct LOCKTAG
|
||||
{
|
||||
Oid relId;
|
||||
Oid objId;
|
||||
Oid classId;
|
||||
Oid dbId;
|
||||
union
|
||||
{
|
||||
BlockNumber blkno;
|
||||
TransactionId xid;
|
||||
} objId;
|
||||
} objsubId;
|
||||
|
||||
/*
|
||||
* offnum should be part of objId.tupleId above, but would increase
|
||||
|
||||
Reference in New Issue
Block a user