transactions -- avoid hanging due to locks

Started by mixoalmost 23 years ago3 messagesgeneral
Jump to latest
#1mixo
mixo@beth.uniforum.org.za

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).

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: mixo (#1)
Re: transactions -- avoid hanging due to locks

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

#3mixo
mixo@beth.uniforum.org.za
In reply to: mixo (#1)
Re: transactions -- avoid hanging due to locks

Did you mean "deadlock_timeout"?

Tom Lane wrote:

Show quoted text

I'd try setting a short statement_timeout.

regards, tom lane