Re: Deadlock Problem

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Deadlock Problem
Дата
Msg-id 2642.1118845392@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Deadlock Problem  (Csaba Nagy <nagy@ecircle-ag.com>)
Ответы Re: Deadlock Problem  (Gavin Love <gavin@aardvarkmedia.co.uk>)
Список pgsql-general
Csaba Nagy <nagy@ecircle-ag.com> writes:
>> Can you explain why sorting by ID would make a difference as I don't
>> understand why what you are suggesting should make a difference?
>
> Because I guess id is your primary key, and that would make your
> transactions always update the same rows in the same order.

If the deadlocks occur because different transactions actually try to
update the same rows concurrently, then this is an appropriate solution.

However I wonder if Gavin is getting bitten by foreign key deadlocks.
Is there any foreign key reference from the stats table to other tables?

            regards, tom lane

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

Предыдущее
От: Bruno Wolff III
Дата:
Сообщение: Re: How to set an expiration date for a WHOLE user account
Следующее
От: Ericson Smith
Дата:
Сообщение: Postgresql performance on Opteron 8 CPU