RE: User locks code
Lincoln Yeoh <lyeoh@pop.jaring.my>
From: Lincoln Yeoh <lyeoh@pop.jaring.my>
To: "Vadim Mikheev" <vmikheev@sectorbase.com>, "Rod Taylor" <rod.taylor@inquent.com>, <pgsql-hackers@postgresql.org>
Date: 2001-08-20T15:52:03Z
Lists: pgsql-hackers
At 11:20 AM 8/19/01 -0700, Vadim Mikheev wrote: >Well, ability to lock only unlocked rows in select for update is useful, >of course. But uniq features of user'locks are: > >1. They don't interfere with normal locks hold by session/transaction. >2. Share lock is available. >3. User can lock *and unlock objects* inside transaction, which is not > (and will not be) available with locks held by transactions. Would your suggested implementation allow locking on an arbitrary string? If it does then one of the things I'd use it for is to insert unique data without having to lock the table or rollback on failed insert (unique index still kept as a guarantee). Cheerio, Link.