Re: Invalid Page Header - Mailing list pgsql-novice

From Michael Fuhr
Subject Re: Invalid Page Header
Date
Msg-id 20060309191646.GA91374@winnie.fuhr.org
Whole thread Raw
In response to Re: Invalid Page Header  ("Christopher A. Goodfellow" <cgoodfellow@tealuxe.com>)
List pgsql-novice
On Thu, Mar 09, 2006 at 01:48:40PM -0500, Christopher A. Goodfellow wrote:
> I have read quite a bit in the archives and it seems the best way is to
> zero_damaged_pages.  I did a search for zero_damaged_pages.  Is it as simple
> as adding zero_damaged_pages to postgresql.conf and restarting the
> postmaster?

To be honest, I'd forgotten about zero_damaged_pages (and I must
have overlooked the recent messages in -hackers that mention it).
I'd prefer to set it in a particular session rather than in
postgresql.conf so it happened only when and where I want.  Here's
an example:

test=# select count(*) from foo;
ERROR:  invalid page header in block 10 of relation "foo"
test=# set zero_damaged_pages to on;
SET
test=# select count(*) from foo;
WARNING:  invalid page header in block 10 of relation "foo"; zeroing out page
WARNING:  invalid page header in block 20 of relation "foo"; zeroing out page
WARNING:  invalid page header in block 30 of relation "foo"; zeroing out page
 count
-------
  9445
(1 row)

test=# set zero_damaged_pages to off;
SET

--
Michael Fuhr

pgsql-novice by date:

Previous
From: "Kevin Crenshaw"
Date:
Subject: Re: Storing sensitive data
Next
From: Tom Lane
Date:
Subject: Re: Invalid Page Header