Re: Enabling Checksums

From: Ants Aasma <ants(at)cybertec(dot)at>
To: Ants Aasma <ants(at)cybertec(dot)at>
Cc: Andres Freund <andres(at)2ndquadrant(dot)com>, Florian Pflug <fgp(at)phlo(dot)org>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Bruce Momjian <bruce(at)momjian(dot)us>, Jeff Davis <pgsql(at)j-davis(dot)com>, Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>, Simon Riggs <simon(at)2ndquadrant(dot)com>, Greg Smith <greg(at)2ndquadrant(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Enabling Checksums
Date: 2013-04-18 16:48:01
Message-ID: CA+CSw_vVGUCVpvKMniZcB6e6p=EWEBahfuBHEw0rmv3Rku=3Qg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Apr 18, 2013 at 5:57 PM, Ants Aasma <ants(at)cybertec(dot)at> wrote:
> I'll generate an avalanche diagram for CRC32C too, but it will take a
> while even if I use a smaller dataset.

Well that was useless... In CRC flipping each bit in the input flips
preset pattern of bits in the output regardless of the actual data on
the page. Some stats for CRC32C - input bits affect 28344 different
bit combinations. Count of bits by number of duplicated bitpatterns:
[(1, 8868),
(2, 17722),
(3, 17775),
(4, 12048),
(5, 5725),
(6, 2268),
(7, 875),
(8, 184),
(9, 45),
(10, 10),
(16, 16)]

Count of bit positions by number of bit-positions affected:
[(0, 16),
(1, 25),
(3, 1185),
(5, 8487),
(7, 22970),
(9, 22913),
(11, 8790),
(13, 1119),
(15, 31)]

Map of number of bit position affected, with 8 being black and 0 or 16
being red attached.

I'm not sure if the issues with partial writes are somehow related to this.

Regards,
Ants Aasma
--
Cybertec Schönig & Schönig GmbH
Gröhrmühlgasse 26
A-2700 Wiener Neustadt
Web: http://www.postgresql-support.de

Attachment Content-Type Size
image/png 28.8 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jeff Davis 2013-04-18 17:04:08 Re: Enabling Checksums
Previous Message Jan Wieck 2013-04-18 15:46:24 Re: (auto)vacuum truncate exclusive lock