postgresql/src/backend/access
Heikki Linnakangas 5028f22f6e Switch to CRC-32C in WAL and other places.
The old algorithm was found to not be the usual CRC-32 algorithm, used by
Ethernet et al. We were using a non-reflected lookup table with code meant
for a reflected lookup table. That's a strange combination that AFAICS does
not correspond to any bit-wise CRC calculation, which makes it difficult to
reason about its properties. Although it has worked well in practice, seems
safer to use a well-known algorithm.

Since we're changing the algorithm anyway, we might as well choose a
different polynomial. The Castagnoli polynomial has better error-correcting
properties than the traditional CRC-32 polynomial, even if we had
implemented it correctly. Another reason for picking that is that some new
CPUs have hardware support for calculating CRC-32C, but not CRC-32, let
alone our strange variant of it. This patch doesn't add any support for such
hardware, but a future patch could now do that.

The old algorithm is kept around for tsquery and pg_trgm, which use the
values in indexes that need to remain compatible so that pg_upgrade works.
While we're at it, share the old lookup table for CRC-32 calculation
between hstore, ltree and core. They all use the same table, so might as
well.
2014-11-04 11:39:48 +02:00
..
common Revert "Allow units to be specified in relation option setting value." 2014-08-29 05:10:47 +09:00
gin Fix GIN data page split ratio calculation. 2014-09-12 11:27:56 +03:00
gist Check for GiST index tuples that don't fit on a page. 2014-10-03 14:49:52 +03:00
hash Avoid copying index tuples when building an index. 2014-07-01 10:34:42 -04:00
heap Update README.tuplock 2014-10-23 20:51:58 -03:00
index Split builtins.h to a new header ruleutils.h 2014-10-08 18:10:47 -03:00
nbtree Message improvements 2014-10-12 01:06:35 -04:00
rmgrdesc Improve code around the recently added rm_identify rmgr callback. 2014-09-22 17:49:34 +02:00
spgist Refactor per-page logic common to all redo routines to a new function. 2014-09-02 15:10:28 +03:00
transam Switch to CRC-32C in WAL and other places. 2014-11-04 11:39:48 +02:00
Makefile Split out rmgr rm_desc functions into their own files 2012-11-28 13:01:15 -03:00