Re: Invalid Page Header Error

From: Denis BUCHER <dbucherml(at)hsolutions(dot)ch>
To: Richard Huxton <dev(at)archonet(dot)com>
Cc: PostgreSQL - General ML <pgsql-general(at)postgresql(dot)org>
Subject: Re: Invalid Page Header Error
Date: 2009-11-01 13:45:09
Message-ID: 4AED90E5.1050407@hsolutions.ch
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hello Richard,

Just to keep you informed...

Richard Huxton a écrit :
>> We had a server crash and when restarting postgres it works, except some
>> "Invalid Page Header Error" :
>
> Data corrupted on disk. Either:
> 1. You have bad hardware
> 2. You have disks lying about fsync
> 3. You have fsync turned off.
>
>> I already try VACUUM / FULL / ANALYSE but same error
>>
>> Even when doing a pg_dumpall, we have this problem.
>
> Yes - a disk-block ("page") on disk has invalid pointers ("header").
>
>> I read a lot of formus, but never a clear solution, what could we do to
>> solve this problem ? (Except from taking the previous backups ?)
>
> If you can restore from a backup, do that.
>
>> If we loose data it's not a problem, I just want to know how postgres
>> can clean himself again...
>
> You might well be able to dump tables individually, apart from the one
> that's corrupted.

Ok that's a good idea...

> You can usually select out rows apart from those that
> are corrupted. There's no easy way to identify all corrupted rows
> without reading them. There's no guarantee that rows might be corrupted
> in a way you don't notice at first.
>
> There's no tool to fix these problems, because there's no simple pattern
> to them if you have hardware failure. Even if there was, you could never
> trust the data without comparing it to a backup.
>
> So - make sure your last backup restores OK. Check your hardware works.
> Make sure you have fsync turned on and your disks are syncing when they
> say they do.

Yes finally we started back from the last backup (a script that dump
database and gzip it everyday is really the best and minimal backup tool
that saved my life more than once :-)))

Denis

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Andre Lopes 2009-11-01 14:20:20 Store images on database ou in external files?
Previous Message Mark Morgan Lloyd 2009-11-01 13:03:33 Re: Forms generator ?