X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id E2A7B8B9B99 for ; Mon, 31 Jan 2005 17:41:51 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 17752-02 for ; Mon, 31 Jan 2005 17:41:31 +0000 (GMT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id D16588B9BC0 for ; Mon, 31 Jan 2005 17:39:40 +0000 (GMT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.1/8.13.1) with ESMTP id j0VHdYJ6020817; Mon, 31 Jan 2005 12:39:34 -0500 (EST) To: Ben Kim Cc: pgsql-admin@postgresql.org Subject: Re: relation tmp_pg_shadow already exists In-reply-to: References: Comments: In-reply-to Ben Kim message dated "Mon, 31 Jan 2005 10:33:00 -0600" Date: Mon, 31 Jan 2005 12:39:34 -0500 Message-ID: <20816.1107193174@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.006 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200501/307 X-Sequence-Number: 16166 Ben Kim writes: > I'm trying to restore a tar dump of postgresql 7.2 databases into a 7.3 > server. I have two databases (db1,db2) both containing binary data. The > tar was dumped with the following command: > pg_dump -C -b -F t -i db1.tar db1 > The first one was restored OK. But on the second one, > pg_restore -d db2 db2.tar > gives me this error. I'm fairly suspicious of the -i switch you are using. As a general rule, you should NEVER use -i unless you have been told to by someone who knows exactly what they are doing. That safety check is there for a reason. Other than that, though, the only thought that comes to mind is that you may be confused about the use of -C. IIRC, specifying it at dump time is useless --- it needs to be given to pg_restore instead. You have evidently got a non-empty (already restored into?) target database and I think you are expecting pg_restore to clean it out, which it will not with these command line options. regards, tom lane