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

From Peter Eisentraut
Subject Re: pg_restore and FK constraints with large dbs
Date
Msg-id Pine.LNX.4.44.0311140043230.17499-100000@peter.localdomain
Whole thread Raw
In response to Re: pg_restore and FK constraints with large dbs  (ow <oneway_111@yahoo.com>)
Responses Re: pg_restore and FK constraints with large dbs
Re: pg_restore and FK constraints with large dbs
List pgsql-admin
ow writes:

> Can you clarify how this would be better than the second option I described?
> Unless pg_restore can somehow create FK constraints differently (and more
> efficiently) than using "ALTER TABLE xxx ADD CONSTRAINT", I do not see how this
> would help.

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.

--
Peter Eisentraut   peter_e@gmx.net


pgsql-admin by date:

Previous
From: ow
Date:
Subject: Re: pg_restore and FK constraints with large dbs
Next
From: Tom Lane
Date:
Subject: Re: dropped users appear as numbers in ACL