Re: pg_restore and FK constraints with large dbs

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: ow <oneway_111(at)yahoo(dot)com>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: pg_restore and FK constraints with large dbs
Date: 2003-11-13 23:44:37
Message-ID: Pine.LNX.4.44.0311140043230.17499-100000@peter.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)gmx(dot)net

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Tom Lane 2003-11-13 23:57:26 Re: dropped users appear as numbers in ACL
Previous Message ow 2003-11-13 23:02:51 Re: pg_restore and FK constraints with large dbs