Proposal: Integrity check - Mailing list pgsql-hackers

From Zdenek Kotala
Subject Proposal: Integrity check
Date
Msg-id 479A14C2.7020203@sun.com
Whole thread Raw
Responses Re: Proposal: Integrity check  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: Proposal: Integrity check  (Simon Riggs <simon@2ndquadrant.com>)
Re: Proposal: Integrity check  (Alvaro Herrera <alvherre@commandprompt.com>)
List pgsql-hackers
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.

2) Extend PageHeaderIsValid function reporting.
  a) split one condition to more and report each problem separately  b) check linp if they point to correct place
(occupiedspace)  c) check overlaying
 


Because some tests are time expensive, IntegrityCheckLevel variable will 
specify how many test will be performed.

3) Add PageHeaderIsValid check also for write operation

In production it should catch problem with memory or software bugs. In 
development it should catch memory overwriting.

4) Add special command (CHECK/VERIFY) or function which validates table 
or whole database.
Any comments?
    Thanks Zdenek


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Default index tablespace
Next
From: Tom Lane
Date:
Subject: Re: Proposal: Integrity check