public inbox for [email protected]
help / color / mirror / Atom feedFrom: Merlin Moncure <[email protected]>
To: [email protected]
Cc: [email protected]
Subject: pg_locks view and user locks
Date: Mon, 13 Sep 2004 13:34:05 -0400
Message-ID: <[email protected]> (raw)
I've been knocking around a bit with user level locks and I have a few
suggestions/questions:
First, the pg_locks view lists user level locks but doesn't really say
much about them. For example, for traditional locks we get the xid but
for user locks we don't really get anything useful. I looked in
lockfuncs.c and didn't see that there would be any real penalty to
displaying the offset/block of the user lock, and returning it in
request from pg_locks. Is this view frequently queried by system
processes?
Why would we want to do this? Well it makes resolving a user lock to a
specific pid easier...admittedly of dubious value but helpful to
me...although if this doesn't fly I can always create an alternate view
which serves my purpose (and perhaps add a high level function to the
/contrib userlock module).
Second,
Is there a reason why user level locks are completely undocumented?
AFAICT, There is no mention of them in anywhere in the docs,
particularly 12.4, which describes methods for application managed
concurrency. The availability of cooperative long term locks is (IMO) a
really nice feature, particularly for people porting legacy applications
which depend on explicit locking (there is some good info in the user
lock module which is unfortunately under the GPL).
Not complaining or looking for help, just curious why they seemed to
have slipped through the cracks.
Merlin
view thread (6+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected]
Subject: Re: pg_locks view and user locks
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox