diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2006-09-22 23:20:14 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2006-09-22 23:20:14 +0000 |
commit | d40d34863e23bbfce2fbdc05e85b92e7ae321ecd (patch) | |
tree | ab2087db4b6334af3722fbc74227dacbc23c4197 /src/include/storage/lock.h | |
parent | beca984e5f1c315d02064e69861be112f5a69b3d (diff) | |
download | postgresql-d40d34863e23bbfce2fbdc05e85b92e7ae321ecd.tar.gz postgresql-d40d34863e23bbfce2fbdc05e85b92e7ae321ecd.zip |
Fix pg_locks view to call advisory locks advisory locks, while preserving
backward compatibility for anyone using the old userlock code that's now
on pgfoundry --- locks from that code still show as 'userlock'.
Diffstat (limited to 'src/include/storage/lock.h')
-rw-r--r-- | src/include/storage/lock.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/include/storage/lock.h b/src/include/storage/lock.h index ac9a71b8760..9717c3f2558 100644 --- a/src/include/storage/lock.h +++ b/src/include/storage/lock.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2006, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/storage/lock.h,v 1.99 2006/09/18 22:40:40 tgl Exp $ + * $PostgreSQL: pgsql/src/include/storage/lock.h,v 1.100 2006/09/22 23:20:14 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -146,7 +146,8 @@ typedef enum LockTagType * pg_description, but notice that we are constraining SUBID to 16 bits. * Also, we use DB OID = 0 for shared objects such as tablespaces. */ - LOCKTAG_USERLOCK /* advisory "user" locks */ + LOCKTAG_USERLOCK, /* reserved for old contrib/userlock code */ + LOCKTAG_ADVISORY /* advisory user locks */ } LockTagType; /* @@ -220,12 +221,12 @@ typedef struct LOCKTAG (locktag).locktag_type = LOCKTAG_OBJECT, \ (locktag).locktag_lockmethodid = DEFAULT_LOCKMETHOD) -#define SET_LOCKTAG_USERLOCK(locktag,id1,id2,id3,id4) \ +#define SET_LOCKTAG_ADVISORY(locktag,id1,id2,id3,id4) \ ((locktag).locktag_field1 = (id1), \ (locktag).locktag_field2 = (id2), \ (locktag).locktag_field3 = (id3), \ (locktag).locktag_field4 = (id4), \ - (locktag).locktag_type = LOCKTAG_USERLOCK, \ + (locktag).locktag_type = LOCKTAG_ADVISORY, \ (locktag).locktag_lockmethodid = USER_LOCKMETHOD) |