From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Csaba Nagy <nagy(at)ecircle-ag(dot)com> |
Cc: | Gavin Love <gavin(at)aardvarkmedia(dot)co(dot)uk>, Postgres general mailing list <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Deadlock Problem |
Date: | 2005-06-15 14:23:12 |
Message-ID: | 2642.1118845392@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Csaba Nagy <nagy(at)ecircle-ag(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Ericson Smith | 2005-06-15 14:27:58 | Postgresql performance on Opteron 8 CPU |
Previous Message | Bruno Wolff III | 2005-06-15 14:11:15 | Re: How to set an expiration date for a WHOLE user account |