Re: Detecting corrupted pages earlier

From: Hiroshi Inoue <Inoue(at)tpf(dot)co(dot)jp>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: Detecting corrupted pages earlier
Date: 2003-02-18 23:56:18
Message-ID: 3E52C822.656FB8AC@tpf.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane wrote:
>
> Postgres has a bad habit of becoming very confused if the page header of
> a page on disk has become corrupted. In particular, bogus values in the
> pd_lower field tend to make it look like there are many more tuples than
> there really are, and of course these "tuples" contain garbage. That
> leads to core dumps, weird complaints about out-of-range transaction
> numbers (the latter generally in the form of an abort referencing a
> nonexistent pg_clog file), and other un-fun stuff.
>
> I'm thinking of modifying ReadBuffer() so that it errors out if the

What does the *error out* mean ?
Is there a way to make our way around the pages ?

> page read in does not contain either zeroes or a valid-looking header.
> (The exception for zeroes seems to be needed for hash indexes, which
> tend to initialize pages out-of-order.) This would make it much easier
> for people to recognize situations where a page header has become
> corrupted on disk.
>
> Comments? Can anyone think of a scenario where this would be a bad
> idea?

IIRC there was a similar thread long ago.
IMHO CRC isn't sufficient because CRC could be calculated
even for (silently) corrupted pages.

regards,
Hiroshi Inoue
http://www.geocities.jp/inocchichichi/psqlodbc/

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2003-02-19 00:08:33 Re: Detecting corrupted pages earlier
Previous Message Ross J. Reedstrom 2003-02-18 23:55:45 Re: psql and readline