Re: Advisory locks seem rather broken - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Advisory locks seem rather broken
Date
Msg-id 26668.1336062601@sss.pgh.pa.us
Whole thread Raw
In response to Re: Advisory locks seem rather broken  (Merlin Moncure <mmoncure@gmail.com>)
List pgsql-hackers
Merlin Moncure <mmoncure@gmail.com> writes:
> On Thu, May 3, 2012 at 11:04 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> I'm inclined to think that a saner implementation would involve
>> splitting the userlock lockmethod into two, one transactional and one
>> not.

> hm, would that be exposed through the pg_locks view?  some users might
> be running queries like "select * from pg_locks where
> locktype='advisory' and ..."

I don't think we can or should change what pg_locks reports.  So they'd
have to look like just one lockmethod at that level.

I'm not actually sure that a split is a practical idea anyway, given
that assorted places use a LockMethod as an identifier for a class of
locks; unless all of those happen to want to distinguish transactional
and session-level userlocks, it'd be problematic.  I plan to look also
at the idea of removing the "transactional" field and seeing what that
breaks...
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Advisory locks seem rather broken
Next
From: Robert Haas
Date:
Subject: CLOG extension