Re: Serializable Isolation without blocking

From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To: "Markus Wanner" <markus(at)bluegap(dot)ch>
Cc: <nicolas(dot)barbier(at)gmail(dot)com>,<robertmhaas(at)gmail(dot)com>, <gsstark(at)mit(dot)edu>, <pgsql-hackers(at)postgresql(dot)org>, <laurenz(dot)albe(at)wien(dot)gv(dot)at>
Subject: Re: Serializable Isolation without blocking
Date: 2010-01-08 23:07:14
Message-ID: 4B476642020000250002E0FA@gw.wicourts.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Again, a somewhat tardy post from a question found in review.

Markus Wanner <markus(at)bluegap(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Greg Smith 2010-01-08 23:17:39 Re: git help
Previous Message Tom Lane 2010-01-08 22:38:22 Re: Setting oom_adj on linux?