Re: Crash while recovering database index relation - Mailing list pgsql-bugs

From Tom Lane
Subject Re: Crash while recovering database index relation
Date
Msg-id 18717.1073488792@sss.pgh.pa.us
Whole thread Raw
In response to Crash while recovering database index relation  (Guy Thornley <guy@esphion.com>)
Responses Re: Crash while recovering database index relation
List pgsql-bugs
Guy Thornley <guy@esphion.com> writes:
> On one of our test boxen here, weve experienced a corrupted file during
> database recovery after box power outage. The specific error message is
>     PANIC: invalid page header in block 6 of relation "17792"
> This was on postgres 7.4.

I believe this is fixed in 7.4.1:

2003-12-01 11:53  tgl

    * src/backend/storage/buffer/: bufmgr.c (REL7_3_STABLE), bufmgr.c
    (REL7_4_STABLE), bufmgr.c: Force zero_damaged_pages to be
    effectively ON during recovery from WAL, since there is no need to
    worry about damaged pages when we are going to overwrite them
    anyway from the WAL.  Per recent discussion.

> By using postgres single-user database server and zero_damaged_pages option
> I manged to get the database up again. There were a LOT of relations with
> this problem !

And no sign of corruption after you'd run through the recovery with
zero_damaged_pages?  That's what I'd expect if this scenario applies:
the pages will be fixed by WAL recovery, it's just that the recently
added check for broken page headers was interfering :-(

            regards, tom lane

pgsql-bugs by date:

Previous
From: "PostgreSQL Bugs List"
Date:
Subject: BUG #1043: PSQL.exe
Next
From: Martin Holz
Date:
Subject: jdbc1.AbstractJdbc1Statement.setBinaryStream bug and patch