Re: Avoiding deadlocks ...

Поиск
Список
Период
Сортировка
От Greg Stark
Тема Re: Avoiding deadlocks ...
Дата
Msg-id AANLkTinrER_07juUcO9FJraya_0dr_QfHx9e-Coa6wP3@mail.gmail.com
обсуждение исходный текст
Ответ на Avoiding deadlocks ...  (Josh Berkus <josh@agliodbs.com>)
Ответы Re: Avoiding deadlocks ...  ("Kevin Grittner" <Kevin.Grittner@wicourts.gov>)
Список pgsql-hackers
On Thu, Aug 19, 2010 at 11:51 PM, 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>

>                        update order where orderid = 5;
> ... deadlock error.
>

Do you actually get a prompt here to type this command?

--
greg


В списке pgsql-hackers по дате отправления:

Предыдущее
От: "Joshua D. Drake"
Дата:
Сообщение: Re: git: uh-oh
Следующее
От: "Kevin Grittner"
Дата:
Сообщение: Re: Avoiding deadlocks ...