Обсуждение: transactions -- avoid hanging due to locks

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

transactions -- avoid hanging due to locks

От
mixo
Дата:
Is it possible to make an update query return immediately with
the result that current update query cannot be performed due to
a transaction that  has locked the entry or entries? For instance,
suppose there is a transction in progress the has locked the row
the with id1, then any other query that the tries to update the
row it would fail, instead of waiting for the transaction
commit (end).





Re: transactions -- avoid hanging due to locks

От
Tom Lane
Дата:
mixo <mixo@beth.uniforum.org.za> writes:
> Is it possible to make an update query return immediately with
> the result that current update query cannot be performed due to
> a transaction that  has locked the entry or entries?

I'd try setting a short statement_timeout.

            regards, tom lane


Re: transactions -- avoid hanging due to locks

От
mixo
Дата:
Did you mean "deadlock_timeout"?

Tom Lane wrote:

>I'd try setting a short statement_timeout.
>
>            regards, tom lane
>