473,378 Members | 1,119 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

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 2061

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Sam | last post by:
I'm having trouble restoring databases that have to lo type installed in /contrib/lo. The dump seems to work just fine, I get no errors when I execute the following command #pg_dump -Fc -o -b...
0
by: andy morrow | last post by:
hi, fairly new to postgres admin stuff...... i have a production machine that is running postgresql 7.1.3 also, there's a test machine which already had 7.0.3, and which i newly installed...
14
by: Ron Johnson | last post by:
Hi, While on the topic of "need for in-place upgrades", I got to think- ing how the pg_restore could be speeded up. Am I wrong in saying that in the current pg_restore, all of the indexes are...
1
by: nednieuws | charles | last post by:
What does this error mean: pg_restore: creating TABLE author pg_restore: creating SEQUENCE author_id pg_restore: could not execute query: ERROR: parser: parse error at or near "BY" at...
6
by: Mike Charnoky | last post by:
Hello, I am currently using PostgreSQL v7.3.4 on a RedHat 8.0 system (2.4.23 kernel) using the ext3 filesystem. I am experiencing problems when performing a pg_restore using a file which is...
1
by: Plant Thomas | last post by:
Hi, I have a problem restoring a database from Postgresql 7.3 ( backup created with 'pg_dump -Ft -b > test.tar' ) to a new database on PostgreSQL 7.4.3 on Cygwin. I get the following error: ...
3
by: Sven Willenberger | last post by:
Created a pg_dump with Fc (custom format compression) that resulted in a 300+MB file. Now trying to pg_restore this thing fails with either an out of memory error (as in the subject line) on...
7
by: Tim Penhey | last post by:
Maybe it's just me, but I can't seem to get pg_restore to restore a database... I am running 8.0 beta 2 (using the dev3 installer) on Windows XP. I created a very simple database with one...
1
by: ruben | last post by:
Hi: I'm trying to dump tableA and restore it to tableB: $ ./pg_dump -Fc -t tableA databaseA -f tableA.dump -v $ ./pg_restore -t tableB -d databaseA tableA.dump -v pg_dump creates...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.