Skip site navigation (1) Skip section navigation (2)

Re: pg_restore ignore error patch

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>
Cc: PostgreSQL Patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: pg_restore ignore error patch
Date: 2004-04-19 22:15:31
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-patches
Fabien COELHO wrote:
> Dear patchers,
> please find a small patch submission so that "pg_restore" ignores some sql
> errors.
> The implementation seems quite reasonnable to me, but pg-gods may have a
> different opinion. Two fields are added to the ArchiveHandler to trigger
> the behavior. A count summary of ignored sql errors is printed at the end
> of the restoration.
> I did not fixed the "set session auth" attempt as option "-O" can already
> be used to avoid it.
> It validates for me, but it seems that pg_dump/pg_restore is just *NOT*
> tested at all in the validation:-(. So at least I tested it.
> My tests suggest that a feature of pg_restore is that it is only expected
> to work with its own server. Indeed, it generates some new syntax, such as
> $$ quoting, which is not compatible with older servers. This fact does not
> seem to appear in the documentation.

I looked over the patch and it seems to continue on pg_restore errors by
default.  That isn't good.  By default, any error should make it exit

I can see value in having a flag that allows pg_restore to continue on
errors, particularly because only pg_restore can read binary dumps.  Do
folks get pg_restor failures frequently?  I sure hope not.

  Bruce Momjian                        |
  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


pgsql-patches by date

Next:From: Bruce MomjianDate: 2004-04-19 22:32:39
Subject: Re: build annoyences
Previous:From: Bruce MomjianDate: 2004-04-19 21:30:40
Subject: Re: minor readme patch for pg_autovacuum

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group