User Level Lock question

From: "Lance Ellinghaus" <lellinghaus(at)yahoo(dot)com>
To: <pgsql-hackers(at)postgresql(dot)org>
Subject: User Level Lock question
Date: 2002-03-15 06:43:07
Message-ID: 002d01c1cbec$b23c4820$3201040a@angel1
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Meskes 2002-03-15 07:57:02 Re: Survey results on Oracle/M$NT4 to PG72/RH72 migration
Previous Message Michael Alan Dorman 2002-03-15 02:33:27 Re: insert statements