Thread: transactions -- avoid hanging due to locks

transactions -- avoid hanging due to locks

From
mixo
Date:
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

From
Tom Lane
Date:
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

From
mixo
Date:
Did you mean "deadlock_timeout"?

Tom Lane wrote:

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