Обсуждение: pg_restore data block error
Dear All:
I am trying to restore a database (size is about 7GB) from a dump file created by a simple backup script..The format is data.pg.
The schema restores fine, but during the data restore, i get the following error:
-bash-2.05b$ pg_restore -a -d access backups/access/data.pg
pg_restore: [custom archiver] could not read data block -- expected 4096, got 3608
I tried this twice now, with backups taken on different days...
I am dumping from 7.2.4 (RH8 - RAID5 set) to 7.4.0 (RH9).
Any ideas please?
Thanks,
Anjan
**************************************************************************
This e-mail and any files transmitted with it are intended for the use of the addressee(s) only and may be confidential and covered by the attorney/client and other privileges. If you received this e-mail in error, please notify the sender; do not disclose, copy, distribute, or take any action in reliance on the contents of this information; and delete it from your system. Any other use of this e-mail is prohibited.
Dear Anjan Dave ,
Anyways try using the following
pg_restore --disable-triggers -i -a -d access backups/access/data.pg
Kindly shootback it this helps
-bash-2.05b$ pg_restore -a -d access backups/access/data.pg
pg_restore: [custom archiver] could not read data block -- expected 4096, got 3608
To me this seems as a error in file format.Anyways try using the following
pg_restore --disable-triggers -i -a -d access backups/access/data.pg
use -i switch for restore of dataI am dumping from 7.2.4 (RH8 - RAID5 set) to 7.4.0 (RH9).
Kindly shootback it this helps
-- Best Regards, Vishal Kashyap Director / Lead Developer, Sai Hertz And Control Systems Pvt Ltd, http://saihertz.rediffblogs.com Jabber IM: vishalkashyap@jabber.org ICQ : 264360076 ----------------------------------------------- You yourself, as much as anybody in the entire universe, deserve your love and affection. - Buddha --------------- I am usually called by the name Vishal Kashyap and my Girlfriend calls me Vishal CASH UP. This is because everyone loves me as Vishal Kashyap and my Girlfriend loves me as CASH. ___ //\\\ ( 0_0 ) ----------------o0o-----o0o---------------------
Same error again.
What would be the other option? Dump the tables individually and restore them?
Thanks,
Anjan
Anjan
-----Original Message-----Dear Anjan Dave ,
From: V i s h a l Kashyap @ [Sai Hertz And Control Systems] [mailto:sank89@sancharnet.in]
Sent: Thursday, February 26, 2004 1:12 PM
To: Anjan Dave
Cc: pgsql-admin@postgresql.org
Subject: Re: [ADMIN] pg_restore data block error
-bash-2.05b$ pg_restore -a -d access backups/access/data.pg
pg_restore: [custom archiver] could not read data block -- expected 4096, got 3608
To me this seems as a error in file format.Anyways try using the following
pg_restore --disable-triggers -i -a -d access backups/access/data.pg
use -i switch for restore of dataI am dumping from 7.2.4 (RH8 - RAID5 set) to 7.4.0 (RH9).
Kindly shootback it this helps
-- Best Regards, Vishal Kashyap Director / Lead Developer, Sai Hertz And Control Systems Pvt Ltd, http://saihertz.rediffblogs.com Jabber IM: vishalkashyap@jabber.org ICQ : 264360076 ----------------------------------------------- You yourself, as much as anybody in the entire universe, deserve your love and affection. - Buddha --------------- I am usually called by the name Vishal Kashyap and my Girlfriend calls me Vishal CASH UP. This is because everyone loves me as Vishal Kashyap and my Girlfriend loves me as CASH. ___ //\\\ ( 0_0 ) ----------------o0o-----o0o---------------------
"Anjan Dave" <adave@vantage.com> writes: > Same error again. > -bash-2.05b$ pg_restore -a -d access > backups/access/data.pg > pg_restore: [custom archiver] could not read data block > -- expected 4096, got 3608 You said the dump file was over 4Gb, right? I'm wondering if you are running into some file-offset-size bug. In particular this recent bug fix might be relevant: 2004-01-03 23:02 tgl * src/bin/pg_dump/pg_backup_archiver.c (REL7_4_STABLE): Fix ReadOffset() to work correctly when off_t is wider than int. although offhand I'm not sure how that would translate into what sounds to be an unexpected-EOF failure. regards, tom lane
Yes, it's about 7GB. I installed it from RPMs...Do I just copy over the pg_backup_archiver.c file? Is there any easy way to dump individual tables (dealing with 73 tables)? Thanks for your response, Anjan -----Original Message----- From: Tom Lane [mailto:tgl@sss.pgh.pa.us] Sent: Friday, February 27, 2004 5:24 PM To: Anjan Dave Cc: aspire420@hotpop.com; pgsql-admin@postgresql.org Subject: Re: [ADMIN] pg_restore data block error "Anjan Dave" <adave@vantage.com> writes: > Same error again. > -bash-2.05b$ pg_restore -a -d access > backups/access/data.pg > pg_restore: [custom archiver] could not read data block > -- expected 4096, got 3608 You said the dump file was over 4Gb, right? I'm wondering if you are running into some file-offset-size bug. In particular this recent bug fix might be relevant: 2004-01-03 23:02 tgl * src/bin/pg_dump/pg_backup_archiver.c (REL7_4_STABLE): Fix ReadOffset() to work correctly when off_t is wider than int. although offhand I'm not sure how that would translate into what sounds to be an unexpected-EOF failure. regards, tom lane