Re: Dumping/Restoring with constraints? - Mailing list pgsql-general

From Tino Wildenhain
Subject Re: Dumping/Restoring with constraints?
Date
Msg-id 48B5BC2A.5070104@wildenhain.de
Whole thread Raw
In response to Dumping/Restoring with constraints?  ("Phoenix Kiula" <phoenix.kiula@gmail.com>)
Responses Re: Dumping/Restoring with constraints?  ("Phoenix Kiula" <phoenix.kiula@gmail.com>)
List pgsql-general
Hi,

Phoenix Kiula wrote:
> Hello. I have a database dump. With data and schema, which includes
> all the constraints and rules. But it seems the pg_dumpall command
> does not copy data in such a way that foreign keys are satisfied upon
> restoring. Because tables are inter-related, importing them keep
> giving errors and eventually no data is imported. Neither pg_dumpall
> nor pg_restore seems to have a "without constraints" or "delay
> constraints check" type command. What am I missing? Thanks for any
> advice.

Apart from disabling triggers temporarely, if you have enough
space in xlog, you could try to add BEGIN work; to the start
of the restore SQL and COMMIT; a the end.

Regards
Tino


Attachment

pgsql-general by date:

Previous
From: William Garrison
Date:
Subject: Re: Restoring a database from a file system snapshot
Next
From: Alvaro Herrera
Date:
Subject: Re: Restoring a database from a file system snapshot