Re: Enabling Checksums

Florian Pflug <fgp@phlo.org>

From: Florian Pflug <fgp@phlo.org>
To: Jeff Davis <pgsql@j-davis.com>
Cc: Greg Smith <greg@2ndQuadrant.com>, Tom Lane <tgl@sss.pgh.pa.us>, Ants Aasma <ants@cybertec.at>, Andres Freund <andres@2ndquadrant.com>, Bruce Momjian <bruce@momjian.us>, Heikki Linnakangas <hlinnakangas@vmware.com>, Simon Riggs <simon@2ndquadrant.com>, PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2013-04-18T17:05:41Z
Lists: pgsql-hackers
On Apr18, 2013, at 19:04 , Jeff Davis <pgsql@j-davis.com> wrote:
> On Wed, 2013-04-17 at 20:21 -0400, Greg Smith wrote:
>> -Original checksum feature used Fletcher checksums.  Its main problems, 
>> to quote wikipedia, include that it "cannot distinguish between blocks 
>> of all 0 bits and blocks of all 1 bits".
> 
> That is fairly easy to fix by using a different modulus: 251 vs 255.

At the expense of a drastic performance hit though, no? Modulus operations
aren't exactly cheap.

best regards,
Florian Pflug