Re: Avoiding deadlocks ...
От | Kevin Grittner |
---|---|
Тема | Re: Avoiding deadlocks ... |
Дата | |
Msg-id | 4C6E70080200002500034996@gw.wicourts.gov обсуждение исходный текст |
Ответ на | Re: Avoiding deadlocks ... (Greg Stark <gsstark@mit.edu>) |
Список | pgsql-hackers |
Greg Stark <gsstark@mit.edu> wrote: > Josh Berkus <josh@agliodbs.com> wrote: >> update session where id = X; >> update order where orderid = 5; >> update order where orderid = 5; > > So i think this will already deadlock. > > A has a exclusive-lock on session<X> and is waiting on order<5>. B > has an exclusive lock on order<5> and is waiting on a share-lock > on session<x> No, see Tom's explanation on the related "Deadlock bug" thread: http://archives.postgresql.org/pgsql-hackers/2010-08/msg01464.php >> update order where orderid = 5; >> ... deadlock error. > > Do you actually get a prompt here to type this command? Yes. The attachment at the start of the other thread makes it easy to confirm: http://archives.postgresql.org/pgsql-hackers/2010-08/msg01447.php -Kevin
В списке pgsql-hackers по дате отправления: