Re: Proposal: Integrity check - Mailing list pgsql-hackers

From Simon Riggs
Subject Re: Proposal: Integrity check
Date
Msg-id 1201299232.4257.528.camel@ebony.site
Whole thread Raw
In response to Proposal: Integrity check  (Zdenek Kotala <Zdenek.Kotala@Sun.COM>)
Responses Re: Proposal: Integrity check
List pgsql-hackers
On Fri, 2008-01-25 at 17:56 +0100, Zdenek Kotala wrote:
> Regarding to Robert Mach's work during Google SOC on data integrity 
> check. I would like to improve storage module and implement some 
> Robert's code into the core.
> 
> I would like to make following modification:
> 
> 1) Add ReadBuffer_noerror (recommend me better name) function which will 
> accept damaged page without Error. This page will be marked as corrupted 
> and when ReadBuffer will touch this page then it will be handled in 
> standard way.
> 
> This is important for check and repair functions to process all table 
> without interruption.

We shouldn't let duff data into shared buffers at all.

I think you could mix the two methods of reading buffers

- start a subtransaction
- read blocks into shared buffers
- if error, then re-read block into private memory and examine
- carry on thru table in a new subtransaction

OK with other points, except I don't want a new command. Let's do it as
a function that can accept block ranges to check, not just whole tables.
e.g. pg_check_blocks(17, 43) would check blocks 17 -> 43

--  Simon Riggs 2ndQuadrant  http://www.2ndQuadrant.com



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Thoughts about bug #3883
Next
From: "Pavel Stehule"
Date:
Subject: we have out func for typecast, but we missing this read function