Re: a SELECT FOR UPDATE question - Mailing list pgsql-general

From Tom Lane
Subject Re: a SELECT FOR UPDATE question
Date
Msg-id 5855.1108090630@sss.pgh.pa.us
Whole thread Raw
In response to Re: a SELECT FOR UPDATE question  (Michael Fuhr <mike@fuhr.org>)
List pgsql-general
Michael Fuhr <mike@fuhr.org> writes:
> It sounds like the best a check could do would be the amazingly
> astute "some transaction held a lock on this row at one time and
> may or may not still hold that lock, and even if it did when you
> checked it might have gone away by now and some other transaction
> that you don't know about might hold a lock."

> Does that about sum it up?  ;-)

Yeah.  Really, if you want to inspect the state of a lock,
the only meaningful operation is to try to acquire the lock.
It's reasonable to offer an "acquire only if immediately available"
operation --- but reporting on the instantaneous state seems
pretty useless by itself.

            regards, tom lane

pgsql-general by date:

Previous
From: Alex Turner
Date:
Subject: Python Driver
Next
From: Jamie Deppeler
Date:
Subject: Distributed Data Base Management System