User Level Lock question - Mailing list pgsql-hackers

From Lance Ellinghaus
Subject User Level Lock question
Date
Msg-id 002d01c1cbec$b23c4820$3201040a@angel1
Whole thread Raw
Responses Re: User Level Lock question  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Is there an easy way to test the lock on a user level lock without actually
issuing the lock?

I would like to use them, but there is only a LockAcquire() and
LockRelease().. There is no LockTest()..

I guess I could do:

IF LockAcquire() == 0:   "locked" do whatever if it is locked...
ELSE:   LockRelease()   "unlocked" do whatever since it was not locked in the first place..

This just seems to be an inefficient way of doing this...

Thanks,
Lance Ellinghaus



pgsql-hackers by date:

Previous
From: Michael Alan Dorman
Date:
Subject: Re: insert statements
Next
From: Michael Meskes
Date:
Subject: Re: Survey results on Oracle/M$NT4 to PG72/RH72 migration