how to get pg_restore to continue if an error occurs

From: "Chris Velevitch" <chris(dot)velevitch(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: how to get pg_restore to continue if an error occurs
Date: 2008-04-14 07:46:02
Message-ID: b0a3bf780804140046x4f10bcedoaf945751a2486d36@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I'm using 7.4.19 utils on Centos 5 to move a database from one shared
hosting server to another shared hosting server.

The dump and restore options that I used are:-

pg_dump -O -v -F c
pg_restore -c -O -x -v

pg_restore aborts the restore (with a return code=1) when trying to
'comment schema "public"', which is because the schema is not owned by
the database owner.

1. How do I get pg_restore to simply ignore this error and continue
the restore to completion?
2. Is it ok to have the schema "public" owned by the owner of the database?
3. How do I tell if the restore is complete as a cursory look seems to
indicate the restore is complete?

Chris
--
Chris Velevitch
Manager - Sydney Flash Platform Developers Group
m: 0415 469 095
www.flashdev.org.au

Sydney Flash Platform Developers Group
April meeting: TBD
Date: Mon 28th April 6pm for 6:30 start
Details soon

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Clemens Schwaighofer 2008-04-14 08:09:01 strange dump problem
Previous Message Andrea 2008-04-14 07:34:33 Help needed in PITR