Skip site navigation (1) Skip section navigation (2)

Re: Block-level CRC checks

From: "Dawid Kuroczko" <qnex42(at)gmail(dot)com>
To: "Jonah H(dot) Harris" <jonah(dot)harris(at)gmail(dot)com>
Cc: "Greg Stark" <greg(dot)stark(at)enterprisedb(dot)com>, "Aidan Van Dyk" <aidan(at)highrise(dot)ca>, "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "Heikki Linnakangas" <heikki(dot)linnakangas(at)enterprisedb(dot)com>, "Brian Hurt" <bhurt(at)janestcapital(dot)com>, "Pg Hackers" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Block-level CRC checks
Date: 2008-10-02 21:51:59
Message-ID: 758d5e7f0810021451m3f5adcb8s639a0e97deecd687@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-hackers
On Thu, Oct 2, 2008 at 7:42 PM, Jonah H. Harris <jonah(dot)harris(at)gmail(dot)com> wrote:
>> It's not the buffeting it's the checksum. The problem arises if a page is
>> read in but no wal logged modifications are done against it. If a hint bit
>> is modified it won't be wal logged but the page is marked dirty.
>
> Ahhhhh.  Thanks Greg.  Let me look into this a bit before I respond :)

Hmm, how about, when reading a page:

read the page
if checksum mismatch {
    flip the hint bits [1]
    if checksum mismatch {
          ERROR
    } else {
          emit a warning, 'found a torn page'
    }
}

...that is assuming we know which bit to flip
and that we accept the check will be a bit
weaker. :)  OTOH this shouldn't happen too
often, so performance should matter much.

My 0.02

   Best regards,
      Dawid Kuroczko

[1]: Of course it would be more efficient to flip
the checksum, but it would be tricky. :)
-- 
  ..................        ``The essence of real creativity is a certain
 : *Dawid Kuroczko* :         playfulness, a flitting from idea to idea
 : qnex42(at)gmail(dot)com :     without getting bogged down by fixated demands.''
 `..................'  Sherkaner Underhill, A Deepness in the Sky, V. Vinge

In response to

Responses

pgsql-hackers by date

Next:From: Simon RiggsDate: 2008-10-02 22:11:28
Subject: Re: [PATCHES] Infrastructure changes for recovery
Previous:From: Simon RiggsDate: 2008-10-02 21:19:55
Subject: Re: Block-level CRC checks

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group