Invalid page header

Started by Poul Møller Hansenalmost 19 years ago4 messagesgeneral
Jump to latest
#1Poul Møller Hansen
freebsd@pbnet.dk

During some time I have had more problems with invalid data in different
parts of a PostgreSQL database.

Until now it has been pointers to non present clog files and an index
file, but now it's in a data file.
I'm getting this error when doing a backup:
invalid page header in block 5377 of relation "events"

Using pg_filedump I get the output below.
Is there any way to recover from that error except doing a restore of
the complete database ?

The errors I get tells me there must be some kind of software / hardware
failure on the server.
It's running Ubuntu 6.06LTS, in the beginning with LVM and XFS filesystem.
I expected that this combination could be the cause, so I took the
server out of service for a week
and tested everything with a burn-in testing tool from the hardware vendor.
I even ran a destructive test on the hard drives. No fault found.

I reinstalled the same Ubuntu version now using ext3 filesystem and no LVM
and now I'm in trouble again.

Any suggestions on what to do ?

Thanks
Poul

*******************************************************************
* PostgreSQL File/Block Formatted Dump Utility - Version 8.1.1
*
* File: 17455
* Options used: -y -f -R 5377 5377
*
* Dump created on: Mon Jul 2 22:37:15 2007
*******************************************************************

Block 5377 ********************************************************
<Header> -----
Block Offset: 0x02a02000 Offsets: Lower 0 (0x0000)
Block: Size 45568 Version 146 Upper 0 (0x0000)
LSN: logid 19268 recoff 0x00000000 Special 57392 (0xe030)
Items: 0 Free Space: 0
Length (including item array): 24

Error: Invalid header information.

0000: 444b0000 00000000 01000000 00000000 DK..............
0010: 30e092b2 aa2a0000 0....*..

<Data> ------
Empty block - no items listed

<Special Section> -----
Error: Invalid special section encountered.
Error: Special section points off page. Unable to dump contents.

*** End of Requested Range Encountered. Last Block Read: 5377 ***

#2Michael Harris
michael.harris@ericsson.com
In reply to: Poul Møller Hansen (#1)
Re: Invalid page header

Hi,

I had a similar problem and overcame it by temporarily setting zero_damaged_pages, then doing a full vacuum and re-index on the affected table.

The rows contained in the corrupted page were lost but the rest of the table was OK after this.

Regards // Mike

-----Original Message-----
From: Poul Møller Hansen [mailto:freebsd@pbnet.dk]
Sent: Tuesday, 3 July 2007 6:57 AM
To: pgsql-general@postgresql.org
Subject: Invalid page header

During some time I have had more problems with invalid data in different
parts of a PostgreSQL database.

Until now it has been pointers to non present clog files and an index
file, but now it's in a data file.
I'm getting this error when doing a backup:
invalid page header in block 5377 of relation "events"

Using pg_filedump I get the output below.
Is there any way to recover from that error except doing a restore of
the complete database ?

The errors I get tells me there must be some kind of software / hardware
failure on the server.
It's running Ubuntu 6.06LTS, in the beginning with LVM and XFS filesystem.
I expected that this combination could be the cause, so I took the
server out of service for a week
and tested everything with a burn-in testing tool from the hardware vendor.
I even ran a destructive test on the hard drives. No fault found.

I reinstalled the same Ubuntu version now using ext3 filesystem and no LVM
and now I'm in trouble again.

Any suggestions on what to do ?

Thanks
Poul

*******************************************************************
* PostgreSQL File/Block Formatted Dump Utility - Version 8.1.1
*
* File: 17455
* Options used: -y -f -R 5377 5377
*
* Dump created on: Mon Jul 2 22:37:15 2007
*******************************************************************

Block 5377 ********************************************************
<Header> -----
Block Offset: 0x02a02000 Offsets: Lower 0 (0x0000)
Block: Size 45568 Version 146 Upper 0 (0x0000)
LSN: logid 19268 recoff 0x00000000 Special 57392 (0xe030)
Items: 0 Free Space: 0
Length (including item array): 24

Error: Invalid header information.

0000: 444b0000 00000000 01000000 00000000 DK..............
0010: 30e092b2 aa2a0000 0....*..

<Data> ------
Empty block - no items listed

<Special Section> -----
Error: Invalid special section encountered.
Error: Special section points off page. Unable to dump contents.

*** End of Requested Range Encountered. Last Block Read: 5377 ***

#3Poul Møller Hansen
freebsd@pbnet.dk
In reply to: Michael Harris (#2)
Re: Invalid page header

I had a similar problem and overcame it by temporarily setting zero_damaged_pages, then doing a full vacuum and re-index on the affected table.

Thanks, I suppose I need to reindex the table afterwards, or they can
point to non existent data ?

Poul

#4Poul Møller Hansen
freebsd@pbnet.dk
In reply to: Michael Harris (#2)
Re: Invalid page header

and re-index on the affected table.

Sorry, was to fast ....

Poul