473,401 Members | 2,139 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,401 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 2064

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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...

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.