From: | David Kerr <dmk(at)mr-paradox(dot)net> |
---|---|
To: | Csaba Nagy <ncslists(at)googlemail(dot)com> |
Cc: | Alvaro Herrera <alvherre(at)commandprompt(dot)com>, Pg General <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Foreign Keys and Deadlocks |
Date: | 2011-11-10 19:24:13 |
Message-ID: | 20111110192413.GA52913@mr-paradox.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Thu, Nov 10, 2011 at 09:09:06AM +0100, Csaba Nagy wrote:
- Hi David,
-
- On Wed, 2011-11-09 at 09:52 -0800, David Kerr wrote:
- > So, aside from removing the PKs do i have any other options?
-
- Sure you have: order the inserts by primary key inside each transaction.
- Then you will not get deadlocks, but inserting the same key again will
- fail of course (but that's the purpose of the primary key, right ?)
-
- Ordering inserts/updates by the columns which cause locks is the first
- thing to do to avoid dead-locks...
-
- Cheers,
- Csaba.
ah, hmmm. i'm not sure if that's an option based on how the program works but
I'll forward the suggestion onto the devleoper. thanks!
From | Date | Subject | |
---|---|---|---|
Next Message | Alban Hertroys | 2011-11-10 19:39:09 | Re: troubleshooting PGError |
Previous Message | Wes Cravens | 2011-11-10 18:51:50 | Re: Returning a row from a function with an appended array field |