pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Chris Gamache <cgg007@yahoo.com>
To: pgsql-admin@postgresql.org
Subject: Dump and Reload process
Date: Fri, 30 Jan 2004 09:28:59 -0800 (PST)
Message-ID: <20040130172859.3625.qmail@web13806.mail.yahoo.com> (raw)

I'm having some issues dumping a database from 7.2, reloading it to 7.4.

I'm using the 7.4 pg_dump. The problem I'm having is an issue of internal
object dependancies. For instance I have a_function that uses b_function. The
a_function gets dumped in first, and errors out because b_function hsan't been
created yet. I've found an ugly workaround: dump the schema first, and run the
sql through multiple times until all the various objects are created. Then
insert the data after.

Here are the dump comands that I used:

pg_dump --create --compress 9 --file=/vol1/work/db_schema_dump-040130.gz
--username=postgres --host=localhost --port=5432 -s mydata &

pg_dump --create --compress 9 --file=/vol1/work/db_data_dump-040130.gz
--username=postgres --host=localhost --port=5432 -a mydata &

There must be a better way! Thoughts?

CG

__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free web site building tool. Try it!
http://webhosting.yahoo.com/ps/sb/



view thread (2+ messages)  latest in thread

Message-ID: <20040130172859.3625.qmail@web13806.mail.yahoo.com>
Permalink:  ../20040130172859.3625.qmail@web13806.mail.yahoo.com/
Also on:    postgresql.org/message-id/20040130172859.3625.qmail@web13806.mail.yahoo.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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: cgg007@yahoo.com
  Subject: Re: Dump and Reload process
  In-Reply-To: <20040130172859.3625.qmail@web13806.mail.yahoo.com>
  References: <20040130172859.3625.qmail@web13806.mail.yahoo.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