Re: Block-level CRC checks - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Block-level CRC checks
Date
Msg-id 23740.1222877106@sss.pgh.pa.us
Whole thread Raw
In response to Re: Block-level CRC checks  (Alvaro Herrera <alvherre@commandprompt.com>)
List pgsql-hackers
Alvaro Herrera <alvherre@commandprompt.com> writes:
> Tom Lane escribi�:
>> No, not at all.  Block-level checksums would be an order of magnitude
>> more expensive: they're on bigger chunks of data and they'd be done more
>> often.

> More often?  My intention is that they are checked when the buffer is
> read in, and calculated/stored when the buffer is written out.

Right.  My point is that the volume of data involved is more than the
WAL traffic.  Example: you update one tuple on a page, your WAL record
is that tuple, but you had to checksum the whole page when you read it
in and you'll have to do it again when you write it out.  Not to mention
that in a read-mostly query mix there's not much WAL traffic at all,
but plenty of page reading (and maybe some writing too, if hint bit
updates happen).

"Order of magnitude" might be an overstatement, but I don't believe
for a moment that the cost will be negligible.  That's why I'm thinking
about something cheaper than a full-blown CRC calculation.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Florian Weimer
Date:
Subject: Re: Block-level CRC checks
Next
From: "Hitoshi Harada"
Date:
Subject: Re: Common Table Expressions (WITH RECURSIVE) patch