I have a 200GB archive I created like this:
% pg_dump -f db1.pga -Fc -b db1
To check that it is good, I tried to restore to another database:
% pg_restore -d db2 db1.pga
[...quickly restores sequences, then...]
pg_restore: [archiver (db)] could not execute query: ERROR: function plpgsql_call_handler already exists with same argument types
Ok, I had installed PLPGSQL in template1, which has been useful in other situations. I drop db2, recreate it, and drop the PLPGSQL language and call handler, then try again:
% pg_restore -d db2 db1.pga
[...restores seqs, tables, keys, then spends several quiet hours (on blobs I assume)...]
pg_restore: [archiver (db)] could not execute query: ERROR: Database comments may only be applied to the current database
I'm not sure how to get around this one. Can an archived database with comments be restored to a database with a different name? Are the comments the only thing missing from the restored database, or could there be other things?
thanks,
Dylan Kuhn