Search Postgresql Archives

Re: Spurious error messages from pg_restore

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Evan Martin wrote
> When I use pg_restore with --clean to restore a PostgreSQL 9.2.4database 
> into a new, blank database it generates thousands of error messages like 
> this:
> 
> pg_restore: [archiver (db)] could not execute query: ERROR:  schema 
> "myschema" does not exist
>      Command was: DROP INDEX myschema.some_index;

The "--clean" parameter is an "option" that you can enable if you feel it
will provide value to your routine.  If you are installing into a "new,
blank database" the clean option has no value to you and you should not be
using it.

The resulting log, when using this option, needs to be processed using tools
like "grep" so that you can:
A) identify and scan over all those "does not exist" messages
B) isolate and review any other message not containing "does not exist"

There are lots on inter-related pieces involved in the whole dump/restore
process.  Your current use-case and example for the "--clean" option are not
going to convince anyone that something requires fixing.

That said bringing up stuff like this is always welcome.  It helps people to
learn and also provides insight to the developers as to what kinds of usage
exists in the wild.  Additional application of "IF EXISTS" likely would be
welcome but the "--clean" option is rarely going to be noise-less.

David J.




--
View this message in context: http://postgresql.1045698.n5.nabble.com/Spurious-error-messages-from-pg-restore-tp5769545p5769625.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.


-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux