Re: deadlock problem

From: Kevin Brown <kevin(at)sysexperts(dot)com>
To: Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: deadlock problem
Date: 2003-03-31 23:41:28
Message-ID: 20030331234128.GL1833@filer
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?

I don't suppose a VACUUM is happening at the same time? I've found
that 7.2.4 likes to give deadlocks during inserts into a table when
it's being VACUUMed (haven't tried it on 7.3.2 yet).

--
Kevin Brown kevin(at)sysexperts(dot)com

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tatsuo Ishii 2003-04-01 00:13:45 Re: optimizer cost calculation problem
Previous Message scott.marlowe 2003-03-31 23:36:01 Re: index corruption?