Re: Detecting locks - Mailing list pgsql-general

From Peter Eisentraut
Subject Re: Detecting locks
Date
Msg-id Pine.LNX.4.30.0104231742510.758-100000@peter.localdomain
Whole thread Raw
In response to Detecting locks  (Sebastian Bossung <bossung@gmx.de>)
List pgsql-general
Sebastian Bossung writes:

> how do you find out if a row is locked _before_ using SELECT ... FOR UPADTE
> on it. The SELECT will wait for the lock to be removed (if there was one),
> making the user think the app crashed.

There is currently no way to detect locks.  You could implement a timeout
in your application after which you send a query cancel.  A waiting lock
still distinguishes it from a crashed program, ISTM.

--
Peter Eisentraut   peter_e@gmx.net   http://funkturm.homeip.net/~peter


pgsql-general by date:

Previous
From: "Oliver Elphick"
Date:
Subject: Re: Need for newbie friendly docs (was Newbie struggling...)
Next
From: "Rich Handler"
Date:
Subject: Problem importing auto-increment fields in MS Access to Postgresql