Re: "deadlock detected" documentation
От | Tom Lane |
---|---|
Тема | Re: "deadlock detected" documentation |
Дата | |
Msg-id | 7737.1053003625@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: "deadlock detected" documentation (Matt Mello <alien@spaceship.com>) |
Ответы |
Re: "deadlock detected" documentation
|
Список | pgsql-sql |
Matt Mello <alien@spaceship.com> writes: > From what I understand, two UPDATEs are trying to update different > fields of the same records at the same time. Sometimes one of the > updates gets this error, sometimes the other. I can code around it, but > I want to be able to prevent this in new situations in the future. > Here are the updates: > UPDATE txn > SET batchid = 19391 > WHERE txn.terminalid = 38 AND yadayada > UPDATE txn > SET drawerid = 50123 > WHERE txn.terminalid = 38 AND yadayada I can't see a reason for bare UPDATEs of that sort to get deadlocks. There must be some other factor involved. Do you have triggers, rules, or foreign keys on this table? Other locks being taken in the same transaction? regards, tom lane
В списке pgsql-sql по дате отправления: