pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Dump and Reload process
2+ messages / 2 participants
[nested] [flat]

* Dump and Reload process
@ 2004-01-30 17:28  Chris Gamache <cgg007@yahoo.com>
  0 siblings, 1 reply; 2+ messages in thread

From: Chris Gamache @ 2004-01-30 17:28 UTC (permalink / raw)
  To: pgsql-admin

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/



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: Dump and Reload process
@ 2004-01-31 05:32  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Chris Gamache <cgg007@yahoo.com>
  0 siblings, 0 replies; 2+ messages in thread

From: Tom Lane @ 2004-01-31 05:32 UTC (permalink / raw)
  To: cgg007@yahoo.com; +Cc: pgsql-admin

Chris Gamache <cgg007@yahoo.com> writes:
> 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.
> ...
> There must be a better way! Thoughts?

This is (at long last) fixed in development tip.  In existing releases,
the only good solution is to use pg_restore's features for manually
controlling the load order :-(

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2004-01-31 05:32 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2004-01-30 17:28 Dump and Reload process Chris Gamache <cgg007@yahoo.com>
2004-01-31 05:32 ` Tom Lane <tgl@sss.pgh.pa.us>

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