Ben Kim <bkim@coe.tamu.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