Bug with pg_restore?

From: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>
To: "Psql_General (E-mail)" <pgsql-general(at)postgresql(dot)org>
Subject: Bug with pg_restore?
Date: 2003-08-19 20:30:14
Message-ID: 3F4288D6.2080609@commandprompt.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Alright, we are testing pg_restore while restoring a 7GB database. This
database has about 6GB of large objects
and about 1Gb of textual data. The problem has been verified on
PostgreSQL 7.3.2, PostgreSQL 7.3.3 and Mammoth PostgreSQL 7.3.4 .
The command being used to backup the data is:

/usr/local/pgsql/bin/pg_dump dominion -h localhost --superuser=postgres
--create --format=c -b -o -f /backups/backup.sql.tar.gz

The command has also failed using:

--format=t -b (without the -o option).

The command to restore the database is:

pg_restore -v -a -O -U '$dbuser' -d '$dbname' '$data_file_path'

The restore starts and all textual data is restore correctly. We appear
to be running into a problem with large objects. The output from
the client end is:

pg_restore: connecting to database backup as user postgres
pg_restore: creating table for large object cross-references
pg_restore: [custom archiver] unable to uncompress data: incorrect data
check
pg_restore: *** aborted because of error

The output is consistent no matter how many times we run the restore.

The output on the server is the same but fails at different points which
leads us away from possible bad data in the restore. Here are
two outputs from the serverlog:

2003-08-19 11:57:24 LOG: statement: Insert Into
pg_dump_blob_xref(oldOid, newOid) Values ('7748083', '22961201');
2003-08-19 11:57:24 LOG: query: Insert Into pg_dump_blob_xref(oldOid,
newOid) Values ('7748083', '22961201');
2003-08-19 11:57:24 DEBUG: ProcessQuery
2003-08-19 11:57:24 LOG: statement: Insert Into
pg_dump_blob_xref(oldOid, newOid) Values ('7748083', '22961201');
2003-08-19 11:57:24 DEBUG: CommitTransactionCommand
2003-08-19 11:57:24 LOG: statement: Insert Into
pg_dump_blob_xref(oldOid, newOid) Values ('7748083', '22961201');
2003-08-19 11:57:24 DEBUG: StartTransactionCommand
2003-08-19 11:57:24 DEBUG: CommitTransactionCommand
2003-08-19 11:57:24 DEBUG: StartTransactionCommand
2003-08-19 11:57:24 DEBUG: CommitTransactionCommand
2003-08-19 11:57:24 DEBUG: StartTransactionCommand
2003-08-19 11:57:24 DEBUG: CommitTransactionCommand
2003-08-19 11:57:24 DEBUG: StartTransactionCommand
2003-08-19 11:57:24 DEBUG: CommitTransactionCommand
2003-08-19 11:57:24 DEBUG: StartTransactionCommand
2003-08-19 11:57:24 DEBUG: CommitTransactionCommand
2003-08-19 11:57:24 DEBUG: StartTransactionCommand
2003-08-19 11:57:24 DEBUG: CommitTransactionCommand
2003-08-19 11:57:24 DEBUG: StartTransactionCommand
2003-08-19 11:57:24 LOG: statement: Insert Into
pg_dump_blob_xref(oldOid, newOid) Values ('7748085', '22961203');
2003-08-19 11:57:24 LOG: query: Insert Into pg_dump_blob_xref(oldOid,
newOid) Values ('7748085', '22961203');
2003-08-19 11:57:24 DEBUG: ProcessQuery
2003-08-19 11:57:24 LOG: statement: Insert Into
pg_dump_blob_xref(oldOid, newOid) Values ('7748085', '22961203');
2003-08-19 11:57:24 DEBUG: CommitTransactionCommand
2003-08-19 11:57:24 LOG: statement: Insert Into
pg_dump_blob_xref(oldOid, newOid) Values ('7748085', '22961203');
2003-08-19 11:57:24 DEBUG: StartTransactionCommand
2003-08-19 11:57:24 DEBUG: CommitTransactionCommand
2003-08-19 11:57:24 DEBUG: StartTransactionCommand
2003-08-19 11:57:24 DEBUG: CommitTransactionCommand
2003-08-19 11:57:24 DEBUG: StartTransactionCommand

Here is a second output. As you can see it is failing on different large
objects:

2003-08-19 12:06:25 LOG: statement: Insert Into
pg_dump_blob_xref(oldOid, newOid) Values ('7739343', '22986858');
2003-08-19 12:06:25 LOG: query: Insert Into pg_dump_blob_xref(oldOid,
newOid) Values ('7739343', '22986858');
2003-08-19 12:06:25 DEBUG: ProcessQuery
2003-08-19 12:06:25 LOG: statement: Insert Into
pg_dump_blob_xref(oldOid, newOid) Values ('7739343', '22986858');
2003-08-19 12:06:25 DEBUG: CommitTransactionCommand
2003-08-19 12:06:25 LOG: statement: Insert Into
pg_dump_blob_xref(oldOid, newOid) Values ('7739343', '22986858');
2003-08-19 12:06:25 DEBUG: StartTransactionCommand
2003-08-19 12:06:25 DEBUG: CommitTransactionCommand
2003-08-19 12:06:25 DEBUG: StartTransactionCommand
2003-08-19 12:06:25 DEBUG: CommitTransactionCommand
2003-08-19 12:06:25 DEBUG: StartTransactionCommand
2003-08-19 12:06:25 DEBUG: CommitTransactionCommand
2003-08-19 12:06:25 DEBUG: StartTransactionCommand
2003-08-19 12:06:25 DEBUG: CommitTransactionCommand
2003-08-19 12:06:25 DEBUG: StartTransactionCommand
2003-08-19 12:06:25 DEBUG: CommitTransactionCommand
2003-08-19 12:06:25 DEBUG: StartTransactionCommand
2003-08-19 12:06:25 DEBUG: CommitTransactionCommand
2003-08-19 12:06:25 DEBUG: StartTransactionCommand
2003-08-19 12:06:25 DEBUG: CommitTransactionCommand
2003-08-19 12:06:25 DEBUG: StartTransactionCommand
2003-08-19 12:06:25 DEBUG: CommitTransactionCommand
2003-08-19 12:06:25 DEBUG: StartTransactionCommand
2003-08-19 12:06:25 DEBUG: CommitTransactionCommand
2003-08-19 12:06:25 DEBUG: StartTransactionCommand
2003-08-19 12:06:25 DEBUG: CommitTransactionCommand
2003-08-19 12:06:25 DEBUG: StartTransactionCommand
2003-08-19 12:06:25 DEBUG: CommitTransactionCommand
2003-08-19 12:06:25 DEBUG: StartTransactionCommand
2003-08-19 12:06:25 DEBUG: CommitTransactionCommand
2003-08-19 12:06:25 DEBUG: StartTransactionCommand
2003-08-19 12:06:25 DEBUG: CommitTransactionCommand
2003-08-19 12:06:25 DEBUG: StartTransactionCommand
2003-08-19 12:06:25 DEBUG: CommitTransactionCommand
2003-08-19 12:06:25 DEBUG: StartTransactionCommand
2003-08-19 12:06:25 DEBUG: CommitTransactionCommand
2003-08-19 12:06:25 DEBUG: StartTransactionCommand
2003-08-19 12:06:25 DEBUG: CommitTransactionCommand
2003-08-19 12:06:25 DEBUG: StartTransactionCommand
2003-08-19 12:06:25 DEBUG: CommitTransactionCommand
2003-08-19 12:06:25 DEBUG: StartTransactionCommand
2003-08-19 12:06:25 DEBUG: CommitTransactionCommand
2003-08-19 12:06:25 DEBUG: StartTransactionCommand
2003-08-19 12:06:25 DEBUG: CommitTransactionCommand
2003-08-19 12:06:25 DEBUG: StartTransactionCommand
2003-08-19 12:06:25 DEBUG: CommitTransactionCommand
2003-08-19 12:06:25 DEBUG: StartTransactionCommand
2003-08-19 12:06:25 DEBUG: CommitTransactionCommand
2003-08-19 12:06:25 DEBUG: StartTransactionCommand
2003-08-19 12:06:25 DEBUG: CommitTransactionCommand
2003-08-19 12:06:25 DEBUG: StartTransactionCommand
2003-08-19 12:06:25 DEBUG: CommitTransactionCommand
2003-08-19 12:06:25 DEBUG: proc_exit(0)
2003-08-19 12:06:25 DEBUG: shmem_exit(0)
2003-08-19 12:06:25 DEBUG: proc_exit(0)
2003-08-19 12:06:25 DEBUG: shmem_exit(0)
2003-08-19 12:06:25 DEBUG: Drop cascades to table pg_dump_blob_xref
2003-08-19 12:06:25 DEBUG: exit(0)
2003-08-19 12:06:25 DEBUG: reaping dead processes
2003-08-19 12:06:25 DEBUG: child process (pid 2062) exited with exit code 0
2003-08-19 12:06:25 DEBUG: Drop auto-cascades to type pg_dump_blob_xref
2003-08-19 12:06:25 DEBUG: Drop auto-cascades to index pg_dump_blob_xref_ix
2003-08-19 12:06:25 DEBUG: exit(0)
2003-08-19 12:06:25 DEBUG: reaping dead processes
2003-08-19 12:06:25 DEBUG: child process (pid 2089) exited with exit code 0

Browse pgsql-general by date

  From Date Subject
Next Message alvherre 2003-08-19 20:39:11 Re: My details
Previous Message Alvaro Herrera 2003-08-19 20:24:51 Re: Mailing list in French