From: | Karsten Hilbert <Karsten(dot)Hilbert(at)gmx(dot)net> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: pg_restore fails |
Date: | 2016-03-13 01:03:15 |
Message-ID: | 20160313010315.GG11080@hermes.hilbert.loc |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Sat, Mar 12, 2016 at 05:49:56PM -0700, David G. Johnston wrote:
> I'd operate under the premise that all warnings and errors are fatal
> (i.e., keep --exit-on-error) until you cannot for some very specific
> reason.
--exit-on-error will exit on _any_ perceived error,
regardless of whether it could be ignored and the restore
still succeed later on. Hence I cannot keep that option in
use in order to implement the below.
The unfortunate thing is that *any* restore will "fail"
because the schema PUBLIC is copied from the template and
that alone will produce an (ignorable) error...
> I'd decide how to proceed at that point. For instance pg_restore
> does provide an ignored error count at the end - you could scan the log for
> expected errors, count them, and compare to that value and fail if the
> count differs.
That is a good idea.
Karsten
--
GPG key ID E4071346 @ eu.pool.sks-keyservers.net
E167 67FD A291 2BEA 73BD 4537 78B9 A9F9 E407 1346
From | Date | Subject | |
---|---|---|---|
Next Message | Leonardo M. Ramé | 2016-03-13 01:25:01 | Distributed Table Partitioning |
Previous Message | David G. Johnston | 2016-03-13 00:49:56 | Re: pg_restore fails |