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

---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

              http://www.postgresql.org/docs/faq

Reply via email to