Re: pg_restore and FK constraints with large dbs

From: ow <oneway_111(at)yahoo(dot)com>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: pg_restore and FK constraints with large dbs
Date: 2003-11-14 16:21:46
Message-ID: 20031114162146.44040.qmail@web21402.mail.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin


--- Peter Eisentraut <peter_e(at)gmx(dot)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

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message jacek 2003-11-14 16:48:53 Re: Problem with compilation 7.3.4
Previous Message Cris Carampa 2003-11-14 15:59:36 Re: Which hardware/filesystem for postgresql?