Re: advisory locks and permissions - Mailing list pgsql-hackers

From Jim C. Nasby
Subject Re: advisory locks and permissions
Date
Msg-id 20060922171206.GL28987@nasby.net
Whole thread Raw
In response to Re: advisory locks and permissions  ("Merlin Moncure" <mmoncure@gmail.com>)
Responses Re: advisory locks and permissions  ("Merlin Moncure" <mmoncure@gmail.com>)
List pgsql-hackers
On Fri, Sep 22, 2006 at 12:56:37PM -0400, Merlin Moncure wrote:
> On 9/22/06, Jim C. Nasby <jim@nasby.net> wrote:
> >This is why I suggested we set aside some range of numbers that should
> >not be used. Doing so would allow adding a better-managed
> >numbering/naming scheme in the future.
> 
> the whole point about advisory locks is that the provided lock space
> is unmanaged. for example, in the ISAM system I wrote which hooked
> into the acucobol virtual file system interface, I used  a global
> sequence for row level pessimistic locking but reserved the 48th bit
> for table level locks.  This system was extremely effective.  on the
> current system I'm working on I use them to lock sequence oid's plus a
> high bit indicator for what i am doing.  in short, advisory locks are
> application-defined in concept.

Yes, but if you get two pieces of code written by different people using
them in the same database, you can get hosed. As PostgreSQL becomes more
popular and more people start developing software for it, this is more
likely to occur.
-- 
Jim Nasby                                            jim@nasby.net
EnterpriseDB      http://enterprisedb.com      512.569.9461 (cell)


pgsql-hackers by date:

Previous
From: AgentM
Date:
Subject: Re: advisory locks and permissions
Next
From: David Fetter
Date:
Subject: Re: 8.3 Development Cycle