Again, a somewhat tardy post from a question found in review. Markus Wanner <mar...@bluegap.ch> wrote: >> I suppose these more persistent write locks should >> be kept out of the DEFAULT lock method, too.... > > I fail to understand that part. What's the DEFAULT lock method? With some adjustment of line wrapping for email... >From src/include/storage/lock.h: ------------------------------------------------------------ /* * Lock methods are identified by LOCKMETHODID. (Despite the * declaration as uint16, we are constrained to 256 lockmethods by * the layout of LOCKTAG.) */ typedef uint16 LOCKMETHODID;
/* These identify the known lock methods */ #define DEFAULT_LOCKMETHOD 1 #define USER_LOCKMETHOD 2 ------------------------------------------------------------ >From the src/backend/storage/lmgr/README: ------------------------------------------------------------ Lock Data Structures -------------------- Lock methods describe the overall locking behavior. Currently there are two lock methods: DEFAULT and USER. Lock modes describe the type of the lock (read/write or shared/ exclusive). In principle, each lock method can have its own set of lock modes with different conflict rules, but currently DEFAULT and USER methods use identical lock mode sets. See src/tools/backend/index.html and src/include/storage/lock.h for more details. (Lock modes are also called lock types in some places in the code and documentation.) ------------------------------------------------------------ At least the initial implementation of the in-memory locks to support detection of rw-dependencies will use the structures defined in the lock.c file. -Kevin -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers