Proposal: Integrity check

From: Zdenek Kotala <Zdenek(dot)Kotala(at)Sun(dot)COM>
To: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Cc: Robert Mach <mach(dot)robert(at)gmail(dot)com>
Subject: Proposal: Integrity check
Date: 2008-01-25 16:56:34
Message-ID: 479A14C2.7020203@sun.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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 (occupied space)
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

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2008-01-25 17:27:22 Re: Proposal: Integrity check
Previous Message Tom Lane 2008-01-25 16:46:00 Re: Default index tablespace