From: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
---|---|
To: | Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au> |
Cc: | Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: deadlock problem |
Date: | 2003-03-31 16:39:46 |
Message-ID: | 200303311639.h2VGdk901823@candle.pha.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Christopher Kings-Lynne wrote:
> I'm always getting deadlocks like this:
>
> [30-Mar-2003 19:19:51] PHP Fatal error: postgres7 error: [0: ERROR:
> deadlock detected
> ] in EXECUTE("INSERT INTO users_foods (user_id, date, meal_id, quantity,
> eaten, food_id) VALUES ('55283', '2003-04-07', '1', '1.00', 'f', '779')")
> in /usr/local/www/generic/lib/adodb/adodb-errorhandler.inc.php on line 71
>
>
> Why would an INSERT cause a deadlock problem? Is this due to the FOR UPDATE
> problem with foreign keys?
Is this in a transaction with other queries? Are there foreign keys to
other tables that may be causing it. I don't remember if INSERT locks
foreign tables, but it might.
--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073
From | Date | Subject | |
---|---|---|---|
Next Message | Stephan Szabo | 2003-03-31 16:41:59 | Re: deadlock problem |
Previous Message | John Liu | 2003-03-31 16:10:21 | 7.3.2 make failed on AIX4.3 using native c compiler |