Re: Enabling Checksums

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Enabling Checksums
Дата
Msg-id 2149.1365865133@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Enabling Checksums  (Andres Freund <andres@2ndquadrant.com>)
Ответы Re: Enabling Checksums  (Andres Freund <andres@2ndquadrant.com>)
Re: Enabling Checksums  (Ants Aasma <ants@cybertec.at>)
Список pgsql-hackers
Andres Freund <andres@2ndquadrant.com> writes:
> On 2013-04-13 09:14:26 -0400, Bruce Momjian wrote:
>> As I understand it, SIMD is just a CPU-optimized method for producing a
>> CRC checksum.  Is that right?  Does it produce the same result as a
>> non-CPU-optimized CRC calculation?

> No we are talking about a different algorithm that results in different
> results, thats why its important to choose now since we can't change it
> later without breaking pg_upgrade in further releases.
> http://en.wikipedia.org/wiki/SIMD_%28hash_function%29

[ squint... ]  We're talking about a *cryptographic* hash function?
Why in the world was this considered a good idea for page checksums?

In the first place, it's probably not very fast compared to some
alternatives, and in the second place, the criteria by which people
would consider it a good crypto hash function have approximately nothing
to do with what we need for a checksum function.  What we want for a
checksum function is high probability of detection of common hardware
failure modes, such as burst errors and all-zeroes.  This is
particularly critical when we're going with only a 16-bit checksum ---
the probabilities need to be skewed in the right direction, or it's not
going to be all that terribly useful.

CRCs are known to be good for that sort of thing; it's what they were
designed for.  I'd like to see some evidence that any substitute
algorithm has similar properties.  Without that, I'm going to vote
against this idea.
        regards, tom lane



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: Enabling Checksums
Следующее
От: Andres Freund
Дата:
Сообщение: Re: Enabling Checksums