pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Bill Moran <wmoran@collaborativefusion.com>
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 10:24:03 -0400
Message-ID: <20080827102403.dc69c802.wmoran@collaborativefusion.com> (raw)
In-Reply-To: <e373d31e0808270712n7c599a82sca5a6bbf6cc5c20a@mail.gmail.com>
References: <e373d31e0808270619uba31c8eodc2c85662b85140a@mail.gmail.com>
	<22708.1219845242@sss.pgh.pa.us>
	<e373d31e0808270712n7c599a82sca5a6bbf6cc5c20a@mail.gmail.com>

In response to "Phoenix Kiula" <phoenix.kiula@gmail.com>:

> > The recommended solution is to use a regular schema-and-data dump.
> > If you really have to separate schema and data, the --disable-triggers
> > switch might help, though you open yourself to the possibility of
> > loading inconsistent data that way.
> 
> Thanks Tom.
> 
> This is the dump command being used on a 8.2.3 database on Linux:
> 
>    $ pg_dumpall > mydb.sql
>    $ umask 077
>    $ gzip mydb.sql
> 
> Then I download the mydb.sql.gz file into my local computer (Mac OSX
> with 8.3.3) and unzip it to mydb.sql.
> 
> The local database is already created, with all tables and constraints and all.

Don't do that.  Do one of the following:
*) Allow the dump file to create all tables.
*) In the early step dump the data only with pg_dumpall --disable-triggers -a

-- 
Bill Moran
Collaborative Fusion Inc.
http://people.collaborativefusion.com/~wmoran/

wmoran@collaborativefusion.com
Phone: 412-422-3463x4023



view thread (36+ messages)  latest in thread

Message-ID: <20080827102403.dc69c802.wmoran@collaborativefusion.com>
Permalink:  ../20080827102403.dc69c802.wmoran@collaborativefusion.com/
Also on:    postgresql.org/message-id/20080827102403.dc69c802.wmoran@collaborativefusion.com

 · 

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: wmoran@collaborativefusion.com, phoenix.kiula@gmail.com, pgsql-general@postgresql.org
  Subject: Re: Dumping/Restoring with constraints?
  In-Reply-To: <20080827102403.dc69c802.wmoran@collaborativefusion.com>

* 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