Skip site navigation (1) Skip section navigation (2)

Re: Crash while recovering database index relation

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Guy Thornley <guy(at)esphion(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: Crash while recovering database index relation
Date: 2004-01-07 15:19:52
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-bugs
Guy Thornley <guy(at)esphion(dot)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

In response to


pgsql-bugs by date

Next:From: Martin HolzDate: 2004-01-07 18:28:17
Subject: jdbc1.AbstractJdbc1Statement.setBinaryStream bug and patch
Previous:From: Serkan SunelDate: 2004-01-07 13:24:11
Subject: RESTORE BUG...

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group