X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id A43ECD1CC75 for ; Fri, 30 Jan 2004 17:29:02 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 24304-10 for ; Fri, 30 Jan 2004 13:29:03 -0400 (AST) Received: from web13806.mail.yahoo.com (web13806.mail.yahoo.com [216.136.175.16]) by svr1.postgresql.org (Postfix) with SMTP id D6C12D1B4D1 for ; Fri, 30 Jan 2004 13:29:01 -0400 (AST) Message-ID: <20040130172859.3625.qmail@web13806.mail.yahoo.com> Received: from [216.173.173.66] by web13806.mail.yahoo.com via HTTP; Fri, 30 Jan 2004 09:28:59 PST Date: Fri, 30 Jan 2004 09:28:59 -0800 (PST) From: Chris Gamache Reply-To: cgg007@yahoo.com Subject: Dump and Reload process To: pgsql-admin@postgresql.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200401/299 X-Sequence-Number: 12162 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/