Re: Uh, this is *not* a 64-bit CRC ...

From: "Vadim Mikheev" <vmikheev(at)sectorbase(dot)com>
To: "PostgreSQL Development" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Uh, this is *not* a 64-bit CRC ...
Date: 2001-03-07 07:40:13
Message-ID: 046c01c0a6d9$d9470c40$4879583f@sectorbase.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> This isn't a 64-bit CRC. It's two independent 32-bit CRCs, one done
> on just the odd-numbered bytes and one on just the even-numbered bytes
> of the datastream. That's hardly any stronger than a single 32-bit CRC;

I believe that the longer data the more chance to get same CRC/hash
for different data sets (if data length > CRC/hash length). Or am I wrong?
Having no crc64 implementation (see below) I decided to use 2 CRC32 instead
of one - it looked better, without any additional cost (record header is
8 byte aligned anyway, on, mmm, most platform).

> it's certainly not what I thought we had agreed to implement.

I've asked if anyone can send crc64 impl to me and got only one from
Nathan Myers. Unfortunately, SWISS-PROT impl assumes that long long
is 8 bytes - is it portable?

Vadim

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Zeugswetter Andreas SB 2001-03-07 07:56:58 AW: Proposed WAL changes
Previous Message Hiroshi Inoue 2001-03-07 07:06:25 Re: Proposed WAL changes