X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id 3D68ED1B8C8 for ; Thu, 21 Aug 2003 11:11:46 -0300 (ADT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 26346-08 for ; Thu, 21 Aug 2003 11:11:37 -0300 (ADT) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by svr1.postgresql.org (Postfix) with ESMTP id 177A0D1BB29 for ; Thu, 21 Aug 2003 11:11:33 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.9/8.12.9) with ESMTP id h7LEBb5H006220; Thu, 21 Aug 2003 10:11:37 -0400 (EDT) To: "dan" Cc: pgsql-admin@postgresql.org Subject: Re: Help with pg_restore In-reply-to: <20030820202323.25950.qmail@home.mahoneys.us> References: <20030820202323.25950.qmail@home.mahoneys.us> Comments: In-reply-to "dan" message dated "Wed, 20 Aug 2003 13:23:23 -0700" Date: Thu, 21 Aug 2003 10:11:37 -0400 Message-ID: <6219.1061475097@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200308/247 X-Sequence-Number: 9968 "dan" writes: > I created the data directory, then ran initdb to do the intial setup. I next > ran: > cat file1 file2 file3 | pg_restore --clean --create > It churned for a while and generated a lot of output (file1 and file 2 are > just over a gigabyte each, and file3 is about 300 MB). But when I ran psql, > none of the tables had been created. What am I doing wrong? After some digging in the CVS logs, I came across this post-7.1 fix: 2001-10-23 17:26 tgl * src/bin/pg_dump/pg_backup_archiver.c: Forbid the switch combination --clean --create, which is pointless (why bother dropping individual objects in a just-created database?) as well as dangerous (as the code stands, the drops will be issued in the wrong database, namely the one you were originally connected to). which might or might not explain your difficulty. What I'm currently suspecting is that pg_restore did restore, but not into the database you expected it to (I think it would have created a new database of the original DB name, and restored into that). regards, tom lane