Re: Transaction-scope advisory locks - Mailing list pgsql-hackers

From Andrew Dunstan
Subject Re: Transaction-scope advisory locks
Date
Msg-id 4D06BF4D.3000200@dunslane.net
Whole thread Raw
In response to Re: Transaction-scope advisory locks  (Simon Riggs <simon@2ndQuadrant.com>)
List pgsql-hackers

On 12/13/2010 07:35 PM, Simon Riggs wrote:
> Same lock space is good. Easy to separate if required.
>
> Explicitly nameable lock spaces would be even better, since if multiple
> applications use them you get strange and unmanageable contention.

Yeah. I have a table of lock names for different locks, and do stuff like:
   perform pg_advisory_lock(l.lockid, some_value)   from my_advisory_locks l   where l.lockname = 'my_lock_name';


I don't know that we need a separately nameable lockspace for 
transaction-scoped locks, though, do we?

cheers

andrew





pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Sync Replication with transaction-controlled durability
Next
From: Marko Tiikkaja
Date:
Subject: Re: Transaction-scope advisory locks