Re: Anyone working on pg_dump dependency ordering? - Mailing list pgsql-hackers

From Andreas Pflug
Subject Re: Anyone working on pg_dump dependency ordering?
Date
Msg-id 3FC124C8.5040105@pse-consulting.de
Whole thread Raw
In response to Re: Anyone working on pg_dump dependency ordering?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Tom Lane wrote:

>Rod Taylor <pg@rbt.ca> writes:
>  
>
>>Well.. the second one will be much slower when the foreign keys verify.
>>Primary, unique constraints I'll buy in the create statement. Check
>>constraints and defaults are a little fuzzier.
>>    
>>
>
>FK, primary, and unique constraints are already split out from the
>CREATE TABLE for performance reasons.  We could think about folding them
>back in in a schema-only dump, but in a full dump I don't think it's
>negotiable --- you really want to load the table data before you install
>these constraints.
>  
>
IMHO here we have opposite requirements: The dump/restore process should 
run as fast as possible, so constraints have to be generated separately, 
but pg_dump is also used to reengineer and slightly modify the schema, 
where it's helpful if definitions are grouped. I've been asked for 
complete schema extraction features in pgAdmin3, and I replied 'use 
pg_dump'. It seems that pg_dump tries to serve both requirements, being 
a compromise where two dedicated tools could do it better.

Regards,
Andreas





pgsql-hackers by date:

Previous
From: Dennis Bjorklund
Date:
Subject: Re: Function parameter names
Next
From: Peter Eisentraut
Date:
Subject: Executable files in CVS