Re: Spurious error messages from pg_restore

From: David Johnston <polobo(at)yahoo(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Spurious error messages from pg_restore
Date: 2013-09-04 19:26:03
Message-ID: 1378322763447-5769625.post@n5.nabble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message David Johnston 2013-09-04 19:31:42 Re: Spurious error messages from pg_restore
Previous Message Alvaro Herrera 2013-09-04 19:16:12 Re: pg_catalog question: Sequence attributes.