472,973 Members | 2,478 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,973 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 2041

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: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
tracyyun
by: tracyyun | last post by:
Hello everyone, I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
2
by: giovanniandrean | last post by:
The energy model is structured as follows and uses excel sheets to give input data: 1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
4
NeoPa
by: NeoPa | last post by:
Hello everyone. I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report). I know it can be done by selecting :...
3
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM) Please note that the UK and Europe revert to winter time on...
0
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...

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.