Re: zero_damaged_pages doesn't work - Mailing list pgsql-general

From Tom Lane
Subject Re: zero_damaged_pages doesn't work
Date
Msg-id 6752.1285628022@sss.pgh.pa.us
Whole thread Raw
In response to Re: zero_damaged_pages doesn't work  (David Boreham <david_list@boreham.org>)
Responses Re: zero_damaged_pages doesn't work
Re: zero_damaged_pages doesn't work
List pgsql-general
David Boreham <david_list@boreham.org> writes:
>   On 9/27/2010 4:40 PM, Jeff Davis wrote:
>> zero_damaged_pages is not meant as a recovery tool. It's meant to allow
>> you to pg_dump whatever data is not damaged, so that you can restore
>> into a fresh location.

> It'd be useful for future generations if this were included in the doc.

> The latest version :
> http://www.postgresql.org/docs/9.0/static/runtime-config-developer.html
> still talks about destroying data (which at least to me implies a
> persistent change to the on-disk bits) and fails to mention that the
> zeroing only occurs in the page pool sans write-back.

The reason it tells you that data will be destroyed is that that could
very well happen.  If the system decides to put new data into what will
appear to it to be an empty page, then the damaged data on disk will be
overwritten, and then there's no hope of recovering anything.

Like Jeff said, this is not a recovery tool.  It's certainly not meant
to be something that you keep turned on for any length of time, and so
the possibility of repeat messages is really not a design consideration
at all.

            regards, tom lane

pgsql-general by date:

Previous
From: David Boreham
Date:
Subject: Re: zero_damaged_pages doesn't work
Next
From: David Boreham
Date:
Subject: Re: zero_damaged_pages doesn't work