pg_restore fails midstream

From: Richard van den Berg <richard(dot)vandenberg(at)trust-factory(dot)com>
To: pgsql-bugs(at)postgresql(dot)org
Subject: pg_restore fails midstream
Date: 2005-12-06 13:11:12
Message-ID: 43958DF0.9050708@trust-factory.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Using psql 8.1.0 on CentOS 4.2, I am trying to upgrade a 400GB database
from pgsql 7.4.7. I made the dump using pg_dump from 8.1.0. After
crunching for 5 hours, pg_restore reports:

pg_restore: [custom archiver] could not uncompress data: incorrect data
check

the postgresql.log says:

2005-12-06 13:39:15 CET ERROR: unexpected message type 0x58 during COPY
from stdin
2005-12-06 13:39:15 CET CONTEXT: COPY repl_activity, line 1923965
2005-12-06 13:39:15 CET LOG: could not send data to client: Broken pipe
2005-12-06 13:39:15 CET LOG: unexpected EOF on client connection

This error was reported before here:
http://archives.postgresql.org/pgsql-general/2005-08/msg01352.php

Since I have about 100 schema's that have a repl_activity table, I had
to resort to trial-and-error to figure out which one was causing
problems. Creating a fresh dump of this table, and restoring it
separately (pg_dump -s foo -t repl_activity ; pg_restore -L
table_data_only.list) enabled me to continue with the original restore
(from the point after the failed item).

This bug is 2 fold in my opinion:

1) pg_restore should indicate which item causes a problem. Item number
suffices, but name might be nice as well.

2) pg_dump appearantly has a bug with dumping some data, re-running
pg_restore on the failed item reproduces the problem every time.

I still have the dump (still restoring now), so I can run further
diagnostics on it if needed.

Sincerely,

--
Richard van den Berg, CISSP
-------------------------------------------
Trust Factory B.V. | www.dna-portal.net
Bazarstraat 44a | www.trust-factory.com
2518AK The Hague | Phone: +31 70 3620684
The Netherlands | Fax : +31 70 3603009
-------------------------------------------

Browse pgsql-bugs by date

  From Date Subject
Next Message Hans Schlper 2005-12-06 14:19:13 BUG #2094: AIX: libraries contain the symbol main
Previous Message Alvaro Herrera 2005-12-05 13:42:49 Re: BUG #2093: SUM of timeintervals, no problems in 8.0.3