Re: ADD FOREIGN KEY (was Re: [GENERAL] 7.4Beta) - Mailing list pgsql-hackers

From Christopher Kings-Lynne
Subject Re: ADD FOREIGN KEY (was Re: [GENERAL] 7.4Beta)
Date
Msg-id 3F77ABA0.4070600@familyhealth.com.au
Whole thread Raw
In response to Re: ADD FOREIGN KEY (was Re: [GENERAL] 7.4Beta)  (Bruce Momjian <pgman@candle.pha.pa.us>)
Responses Re: ADD FOREIGN KEY (was Re: [GENERAL] 7.4Beta)  (Bruce Momjian <pgman@candle.pha.pa.us>)
Re: ADD FOREIGN KEY (was Re: [GENERAL] 7.4Beta)  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: ADD FOREIGN KEY (was Re: [GENERAL] 7.4Beta)  (Andreas Pflug <pgadmin@pse-consulting.de>)
List pgsql-hackers
You could just as easily argue that the lack of integrity testing at 
data load time was equally a bug.

I think we need someway of telling postgres to suppress a foreign key check.

The main problem is that the foreign key column is often not indexed.

Chris

Bruce Momjian wrote:
> Tom Lane wrote:
> 
>>Bruce Momjian <pgman@candle.pha.pa.us> writes:
>>
>>>Tom Lane wrote:
>>>
>>>>Well, we haven't even *got* a proposed patch yet, but yeah we should
>>>>tread carefully.
>>
>>>OK.  What releases had this slow restore problem?
>>
>>We introduced it in 7.3 --- before that, FKs were simply dumped as
>>"create trigger" commands, and there was no check overhead.  So arguably
>>it is a bug; a performance bug maybe, but that's still a bug.  No one
>>has yet gone through a dump/reload cycle in which they had to face this
>>penalty.
> 
> 
> Now that is a strong argument. I knew you would find one.  :-)
> 




pgsql-hackers by date:

Previous
From: Rod Taylor
Date:
Subject: Alter Table Column Datatype
Next
From: "Marc G. Fournier"
Date:
Subject: Re: 2-phase commit