Обсуждение: BUG #1633: about transactions and row level locking

Поиск
Список
Период
Сортировка

BUG #1633: about transactions and row level locking

От
"deepak"
Дата:
The following bug has been logged online:

Bug reference:      1633
Logged by:          deepak
Email address:      deepak@jtech.co.in
PostgreSQL version: 8.0.1
Operating system:   MS windows 2000 Server
Description:        about transactions and row level locking
Details:

How we can know a record is locked before updating the record. The purpose
is to avoid deadlock or queuing of update statements while using "select *
from table for update".

Re: BUG #1633: about transactions and row level locking

От
Bruno Wolff III
Дата:
On Wed, Apr 27, 2005 at 13:56:02 +0100,
  deepak <deepak@jtech.co.in> wrote:
>
> The following bug has been logged online:

This isn't a bug, its a question. I am moving the discussion over to
the general list.

> Bug reference:      1633
> Logged by:          deepak
> Email address:      deepak@jtech.co.in
> PostgreSQL version: 8.0.1
> Operating system:   MS windows 2000 Server
> Description:        about transactions and row level locking
> Details:
>
> How we can know a record is locked before updating the record. The purpose
> is to avoid deadlock or queuing of update statements while using "select *
> from table for update".

You might be able to use a short timeout on the statement that tries the
update.