]> granicus.if.org Git - postgresql/commit
Restructure LOCKTAG as per discussions of a couple months ago.
authorTom Lane <tgl@sss.pgh.pa.us>
Fri, 29 Apr 2005 22:28:24 +0000 (22:28 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Fri, 29 Apr 2005 22:28:24 +0000 (22:28 +0000)
commit3a694bb0a16fea1662f1ffd31506a72effdd4a93
tree50bbf16b3117aada49b2709f524b3bdcf1a36815
parent32d3b47e6f05c7137debddb68730a25fe1bb0cd6
Restructure LOCKTAG as per discussions of a couple months ago.
Essentially, we shoehorn in a lockable-object-type field by taking
a byte away from the lockmethodid, which can surely fit in one byte
instead of two.  This allows less artificial definitions of all the
other fields of LOCKTAG; we can get rid of the special pg_xactlock
pseudo-relation, and also support locks on individual tuples and
general database objects (including shared objects).  None of those
possibilities are actually exploited just yet, however.

I removed pg_xactlock from pg_class, but did not force initdb for
that change.  At this point, relkind 's' (SPECIAL) is unused and
could be removed entirely.
14 files changed:
contrib/userlock/README.user_locks
contrib/userlock/user_locks.c
contrib/userlock/user_locks.h
src/backend/access/heap/hio.c
src/backend/access/nbtree/nbtpage.c
src/backend/storage/lmgr/README
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/include/catalog/pg_attribute.h
src/include/catalog/pg_class.h
src/include/storage/lmgr.h
src/include/storage/lock.h