Re: pg_dump 'die_on_errors'

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Philip Warner <pjw(at)rhyme(dot)com(dot)au>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pg_dump 'die_on_errors'
Date: 2004-08-12 03:27:14
Message-ID: 200408120327.i7C3RET14138@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Tom Lane wrote:
> Philip Warner <pjw(at)rhyme(dot)com(dot)au> writes:
> > At 02:31 AM 12/08/2004, Tom Lane wrote:
> >> result of
> >> considerable experience that says die_on_errors is NOT the right
> >> behavior for pg_restore.
>
> > Can you point me to examples?
>
> Trawl the archives for pg_restore complaints ... but basically the point
> is that if you fail to restore object N, that doesn't mean you should
> refuse to even try to restore the objects after it. A typical example
> is that ALTER OWNER TO fails because the original owner doesn't exist in
> the new DB. There is no reason here not to keep plugging. If you
> abort, the user will have to erase the DB, add the user (whether he
> wants to or not, and whether he has the privileges to or not), and start
> over. If you don't abort, the worst case is that he has to do exactly
> that anyway; but he may not care, and even if he does care it may be a
> lot faster to fix things by hand afterwards.
>
> It probably would be a good idea to try to fix things to make the
> restore operation less noisy (eg, ditch all the NOTICEs about creating
> indexes) so that people could see the actual errors more easily. That's
> not at all the same thing as putting in die-on-error, though.

Set client_min_messages to WARNING?

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2004-08-12 03:27:49 Re: dollar-quoting in psql and in general
Previous Message Bruce Momjian 2004-08-12 03:26:30 Re: [HACKERS] SAVEPOINT syntax again

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2004-08-12 03:34:13 Re: [HACKERS] SAVEPOINT syntax again
Previous Message Bruce Momjian 2004-08-12 03:26:30 Re: [HACKERS] SAVEPOINT syntax again