Discussion:
pg_restore data block error
(too old to reply)
Anjan Dave
2004-02-26 14:35:39 UTC
Permalink
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.
V i s h a l Kashyap @ [Sai Hertz And Control Systems]
2004-02-26 18:11:38 UTC
Permalink
Dear Anjan Dave ,
Post by Anjan Dave
-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
Post by Anjan Dave
I am dumping from 7.2.4 (RH8 - RAID5 set) to 7.4.0 (RH9).
use -i switch for restore of data
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: ***@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
2004-02-27 19:46:05 UTC
Permalink
Same error again.

What would be the other option? Dump the tables individually and restore
them?

Thanks,
Anjan

-----Original Message-----
From: V i s h a l Kashyap @ [Sai Hertz And Control Systems]
[mailto:***@sancharnet.in]
Sent: Thursday, February 26, 2004 1:12 PM
To: Anjan Dave
Cc: pgsql-***@postgresql.org
Subject: Re: [ADMIN] pg_restore data block error


Dear Anjan Dave ,


-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




I am dumping from 7.2.4 (RH8 - RAID5 set) to 7.4.0
(RH9).

use -i switch for restore of data
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: ***@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---------------------
Tom Lane
2004-02-27 22:24:21 UTC
Permalink
Post by Anjan Dave
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

---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faqs/FAQ.html
Anjan Dave
2004-02-27 22:28:52 UTC
Permalink
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:***@sss.pgh.pa.us]
Sent: Friday, February 27, 2004 5:24 PM
To: Anjan Dave
Cc: ***@hotpop.com; pgsql-***@postgresql.org
Subject: Re: [ADMIN] pg_restore data block error
Post by Anjan Dave
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

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org

Loading...