pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tino Wildenhain <tino@wildenhain.de>
To: Phoenix Kiula <phoenix.kiula@gmail.com>
Cc: PG-General Mailing List <pgsql-general@postgresql.org>
Subject: Re: Dumping/Restoring with constraints?
Date: Wed, 27 Aug 2008 22:42:18 +0200
Message-ID: <48B5BC2A.5070104@wildenhain.de> (raw)
In-Reply-To: <e373d31e0808270619uba31c8eodc2c85662b85140a@mail.gmail.com>
References: <e373d31e0808270619uba31c8eodc2c85662b85140a@mail.gmail.com>

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

Attachments:

  smime.p7s (application/x-pkcs7-signature, 3.2K) download

view thread (36+ messages)  latest in thread

Message-ID: <48B5BC2A.5070104@wildenhain.de>
Permalink:  ../48B5BC2A.5070104@wildenhain.de/
Also on:    postgresql.org/message-id/48B5BC2A.5070104@wildenhain.de

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: tino@wildenhain.de, phoenix.kiula@gmail.com, pgsql-general@postgresql.org
  Subject: Re: Dumping/Restoring with constraints?
  In-Reply-To: <48B5BC2A.5070104@wildenhain.de>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox