Re: Deadlock situation using foreign keys (reproduceable) - Mailing list pgsql-hackers

From Stephan Szabo
Subject Re: Deadlock situation using foreign keys (reproduceable)
Date
Msg-id 20020825215258.A55772-100000@megazone23.bigpanda.com
Whole thread Raw
In response to Re: Deadlock situation using foreign keys (reproduceable)  (Thomas O'Dowd <tom@nooper.com>)
List 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.




pgsql-hackers by date:

Previous
From: Thomas O'Dowd
Date:
Subject: Re: Deadlock situation using foreign keys (reproduceable)
Next
From: "Christopher Kings-Lynne"
Date:
Subject: Re: [GENERAL] PostgreSQL 7.2.2: Security Release