From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Ben Kim <bkim(at)coe(dot)tamu(dot)edu> |
Cc: | pgsql-admin(at)postgresql(dot)org |
Subject: | Re: relation tmp_pg_shadow already exists |
Date: | 2005-01-31 17:39:34 |
Message-ID: | 20816.1107193174@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
Ben Kim <bkim(at)coe(dot)tamu(dot)edu> 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
From | Date | Subject | |
---|---|---|---|
Next Message | akanksha kulkarni | 2005-01-31 18:53:21 | Unsubscribe |
Previous Message | Ben Kim | 2005-01-31 16:33:00 | relation tmp_pg_shadow already exists |