Re: Detecting locks

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Sebastian Bossung <bossung(at)gmx(dot)de>
Cc: Postgres General Mailinglist <pgsql-general(at)postgresql(dot)org>
Subject: Re: Detecting locks
Date: 2001-04-23 15:44:28
Message-ID: Pine.LNX.4.30.0104231742510.758-100000@peter.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)gmx(dot)net http://funkturm.homeip.net/~peter

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Lamar Owen 2001-04-23 15:57:34 Re: sysconfdir
Previous Message Gregory Wood 2001-04-23 15:42:39 Re: Replication and on-line recovery