- Modifies LOCKTAG to include a 'classId'. Relation receive a classId of
authorBruce Momjian <bruce@momjian.us>
Wed, 19 Feb 2003 04:02:54 +0000 (04:02 +0000)
committerBruce Momjian <bruce@momjian.us>
Wed, 19 Feb 2003 04:02:54 +0000 (04:02 +0000)
commitd0f3a7e9c453b10ad3c16a780858dd2621fc184a
tree65eb2dae2caf85698858259b36ba9c40ed1d848b
parent81f6db4803082f89b86a2d4701bf6237e6988db5
- 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
src/backend/commands/typecmds.c
src/backend/parser/parse_type.c
src/backend/storage/lmgr/deadlock.c
src/backend/storage/lmgr/lmgr.c
src/backend/storage/lmgr/lock.c
src/backend/utils/adt/lockfuncs.c
src/bin/initdb/initdb.sh
src/include/storage/lmgr.h
src/include/storage/lock.h
src/test/regress/expected/rules.out