470,647 Members | 1,183 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,647 developers. It's quick & easy.

Bug with pg_restore?

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



---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend

Nov 11 '05 #1
0 1930

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Sam | last post: by
reply views Thread by andy morrow | last post: by
14 posts views Thread by Ron Johnson | last post: by
6 posts views Thread by Mike Charnoky | last post: by
1 post views Thread by Plant Thomas | last post: by
7 posts views Thread by Tim Penhey | last post: by
1 post views Thread by ruben | last post: by
reply views Thread by warner | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.