Re: pg_restore and FK constraints with large dbs - Mailing list pgsql-admin

From ow
Subject Re: pg_restore and FK constraints with large dbs
Date
Msg-id 20031114162146.44040.qmail@web21402.mail.yahoo.com
Whole thread Raw
In response to Re: pg_restore and FK constraints with large dbs  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-admin
--- Peter Eisentraut <peter_e@gmx.net> wrote:
> If you you pg_dump and dump schema and data together, then there is some
> magic to temporarily disable foreign key constraints.  Try it out.
> Perhaps you can adopt the statements to your particular restoration method
> as well, if it turns out necessary.
>

No longer have the db to extract data and schema together (have only data
extracts), but I'll try later.

However, if FK constraints are temporarily disabled in pg_restore, why is it
necessary to arrage the statimements in the order that satisfies FK
constraints? One could be doing this for days ...

Wouldn't be simpler for pg_restore to do the following:
1) create table structures only (no indexes or constraints)
2) create indexes
3) create constraints

This way, there's no need to rearrange the order of imports.

Thanks





__________________________________
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard
http://antispam.yahoo.com/whatsnewfree

pgsql-admin by date:

Previous
From: Tom Lane
Date:
Subject: Re: Oracle and PostgreSQL servers incompatibility
Next
From: jacek
Date:
Subject: Re: Problem with compilation 7.3.4