Re: Transaction-scope advisory locks
Andrew Dunstan <andrew@dunslane.net>
From: Andrew Dunstan <andrew@dunslane.net>
To: Simon Riggs <simon@2ndQuadrant.com>
Cc: Marko Tiikkaja <marko.tiikkaja@cs.helsinki.fi>, Szymon Guz <mabewlun@gmail.com>, pgsql-hackers@postgresql.org
Date: 2010-12-14T00:50:21Z
Lists: 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