Re: Foreign key order evaluation - Mailing list pgsql-general

From Michael Fuhr
Subject Re: Foreign key order evaluation
Date
Msg-id 20040928033512.GA83625@winnie.fuhr.org
Whole thread Raw
In response to Foreign key order evaluation  ("Shawn Chisholm" <ShawnC@sandvine.com>)
List pgsql-general
On Mon, Sep 27, 2004 at 03:19:47PM -0400, Shawn Chisholm wrote:
>
> Hi, I am trying to deal with a deadlock situation caused by foreign
> key references on insert and I was wondering if anyone knows what
> order the foreign keys are locked (or evaluated) in for a particular
> table?  Deferring the locks is unfortunately not a good option for me...

What do you mean by "what order the foreign keys are locked"?  Can
you give us an example of what you're doing and what problem you're
trying to solve?  As I mentioned in reply to your earlier message,
foreign key locking and the potential for deadlock were recently
brought up in pgsql-general:

http://archives.postgresql.org/pgsql-general/2004-09/msg00405.php
http://archives.postgresql.org/pgsql-general/2004-09/msg00442.php

My followup to that thread (the second link above) mentions somebody
else's suggestion for a shared lock on the foreign key, but as far
as I can tell, no such solution has been implemented as of 8.0.0beta3.

--
Michael Fuhr
http://www.fuhr.org/~mfuhr/

pgsql-general by date:

Previous
From: Sean Shanny
Date:
Subject: Getting an out of memory failure.... (long email)
Next
From: Tom Lane
Date:
Subject: Re: Getting an out of memory failure.... (long email)