X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (developer.postgresql.org [64.117.224.193]) by svr1.postgresql.org (Postfix) with ESMTP id 8E1A9EFF79 for ; Fri, 6 Jun 2003 14:50:01 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (svr1.postgresql.org [64.117.224.193]) (amavisd-new, port 10024) with ESMTP id 19940-03 for ; Fri, 6 Jun 2003 14:50:00 +0000 (GMT) Received: from www.postgresql.com (www.postgresql.com [64.117.225.209]) by svr1.postgresql.org (Postfix) with ESMTP id 008CAF00C2 for ; Fri, 6 Jun 2003 14:47:53 +0000 (GMT) Received: from irko.smoothcorp.com (unknown [208.49.241.41]) by www.postgresql.com (Postfix) with ESMTP id 6B8DCCF82E8 for ; Thu, 5 Jun 2003 20:25:51 +0000 (GMT) Received: from jgardner.ifloor.com ([10.0.1.63]) by irko.smoothcorp.com with esmtp (Exim 4.12) id 19O1Fy-0004MQ-00; Thu, 05 Jun 2003 13:22:42 -0700 Received: from jgardner.ifloor.com (localhost.localdomain [127.0.0.1]) by jgardner.ifloor.com (8.12.8/8.12.8) with ESMTP id h55KMirW005134; Thu, 5 Jun 2003 13:22:44 -0700 Received: from localhost (localhost [[UNIX: localhost]]) by jgardner.ifloor.com (8.12.8/8.12.8/Submit) id h55KMipC005132; Thu, 5 Jun 2003 13:22:44 -0700 From: Jonathan Gardner To: "David A. Leedom" , pgsql-admin@postgresql.org Subject: Re: Backup and Restore Date: Thu, 5 Jun 2003 13:22:42 -0700 User-Agent: KMail/1.5 References: <5.2.0.9.0.20030605075052.028d9888@mail.hightowergroup.com> In-Reply-To: <5.2.0.9.0.20030605075052.028d9888@mail.hightowergroup.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Description: clearsigned data Content-Disposition: inline Message-Id: <200306051322.43748.jgardner@jonathangardner.net> X-SA-Exim-Rcpt-To: daleedom@hightowergroup.com, pgsql-admin@postgresql.org X-SA-Exim-Scanned: No; SAEximRunCond expanded to false X-Archive-Number: 200306/52 X-Sequence-Number: 9043 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Thursday 05 June 2003 04:56, David A. Leedom wrote: > I am using 7.2.x. When I run pg_dump on a database the objects are not > loaded in the correct dependency order. > > Soooo.... when I run pg_restore it fails because objects that are needed > have not been restored yet (ie. trieds to restore a view that points to a > table that has not yet been restored). I then monkey around with the Tab= le > of Contents (TOC) and am able to get the restore to work. > Don't use pg_restore. Use psql. Note that pg_dump dumps a bunch of SQL=20 commands. This is also a cheap way to "vacuum" the database: # pg_dump | gzip > dump.gz # dropdb # createdb # gunzip -c dump.gz > psql - --=20 Jonathan Gardner (was jgardn@alumni.washington.edu) Live Free, Use Linux! -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQE+36aSWgwF3QvpWNwRAveXAJ4qiMWs7bAsAQoQYmUb0j1bkYOrjwCgwVt6 Gkotl26Q7541ofhVDTP4lQk=3D =3DU7V7 -----END PGP SIGNATURE-----