Re: Deadlock situation using foreign keys (reproduceable)

From: Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>
To: Thomas O'Dowd <tom(at)nooper(dot)com>
Cc: <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Deadlock situation using foreign keys (reproduceable)
Date: 2002-08-26 04:58:23
Message-ID: 20020825215258.A55772-100000@megazone23.bigpanda.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 26 Aug 2002, Thomas O'Dowd wrote:

> Thanks for your feedback Stephan. Seems like a tough fix. Pitty it won't
> make it into 7.3. I presume there are other folk out there suffering
> from the same problems that I'm having. What approaches if any have
> people taken to work around this problem? I read in the list that one
> user patched his postmaster to explictly ignore the RI "FOR UPDATE" on
> tables he knew weren't changing. Can't find the detailed message in the
> archives right now, but I read it earlier. Any other work-arounds?

For many schemas setting the constraints to deferrable makes the problem
go away in practice (due to the fact the constraint locks are held for
less time). Removing for update really only does work if you know that
one side of the constraint never changes concurrently with the other side.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Christopher Kings-Lynne 2002-08-26 05:06:48 Re: [GENERAL] PostgreSQL 7.2.2: Security Release
Previous Message Thomas O'Dowd 2002-08-26 04:33:39 Re: Deadlock situation using foreign keys (reproduceable)