deadlock priority?

Started by Sergei Shelukhinover 18 years ago3 messagesgeneral
Jump to latest
#1Sergei Shelukhin
realgeek@gmail.com

Hi. I have a query that does some batch deletes and inserts into a
table. It runs for 2-3 minutes when the application that uses the
database is in production with users doing stuff.
Recently I have noticed that this query is a frequent victim of
deadlocks.

Is there any way to set a deadlock priority of this transaction or
some other setting so that it is never chosen as a deadlock victim if
only one instance of the transaction is running at the same time? All
other accesses to the table may be killed because of the deadlock but
not this query.

#2Alvaro Herrera
alvherre@2ndquadrant.com
In reply to: Sergei Shelukhin (#1)
Re: deadlock priority?

Sergei Shelukhin escribi�:

Hi. I have a query that does some batch deletes and inserts into a
table. It runs for 2-3 minutes when the application that uses the
database is in production with users doing stuff.
Recently I have noticed that this query is a frequent victim of
deadlocks.

What Pg version are you using?

--
Alvaro Herrera http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.

#3Sergei Shelukhin
realgeek@gmail.com
In reply to: Alvaro Herrera (#2)
Re: deadlock priority?

Alvaro Herrera wrote:

Sergei Shelukhin escribi�:

Hi. I have a query that does some batch deletes and inserts into a
table. It runs for 2-3 minutes when the application that uses the
database is in production with users doing stuff.
Recently I have noticed that this query is a frequent victim of
deadlocks.

What Pg version are you using?

8.2