Re: [GENERAL] Advisory transaction lock for 128-bit space

2012-03-08 Thread Merlin Moncure
On Thu, Mar 8, 2012 at 2:05 AM, Kiriakos Georgiou wrote: > Indeed, if there is not some sort of implementation limitation, it would be > cool to be able to lock two big integers like so: > >     pg_try_advisory_xact_lock(key1 bigint, key2 bigint) Well, this would require expanding the structure t

Re: [GENERAL] Advisory transaction lock for 128-bit space

2012-03-08 Thread Kiriakos Georgiou
Indeed, if there is not some sort of implementation limitation, it would be cool to be able to lock two big integers like so: pg_try_advisory_xact_lock(key1 bigint, key2 bigint) That would solve your problem with locking UUIDs (although you still couldn't lock UUIDs simultaneously across di

Re: [GENERAL] Advisory transaction lock for 128-bit space

2012-03-07 Thread Bill Moran
In response to Andrey Chursin : > Hello. > My application need to set advisory lock on UUID key, almost like it > does pg_advisory_xact_lock function. The problem is argument type of > this function - it consumes 8-byte value, not 16-byte. > > I can not lock on any(hi, low or middle) 8-byte part

[GENERAL] Advisory transaction lock for 128-bit space

2012-03-07 Thread Andrey Chursin
Hello. My application need to set advisory lock on UUID key, almost like it does pg_advisory_xact_lock function. The problem is argument type of this function - it consumes 8-byte value, not 16-byte. I can not lock on any(hi, low or middle) 8-byte part of UUID, as far as it can produce unexpected