postgresql/src/backend/utils/cache
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
..
attoptcache.c pgindent run for 9.4 2014-05-06 12:12:18 -04:00
catcache.c Add Asserts to verify that catalog cache keys are unique and not null. 2014-06-20 18:21:05 -04:00
evtcache.c Update copyright for 2014 2014-01-07 16:05:30 -05:00
inval.c Avoid setup work for invalidation messages at start-of-(sub)xact. 2014-10-29 12:35:19 -04:00
lsyscache.c Don't require sort support functions to provide a comparator. 2014-08-06 16:06:06 -04:00
Makefile Add infrastructure for mapping relfilenodes to relation OIDs. 2013-07-22 11:09:10 -04:00
plancache.c Row-Level Security Policies (RLS) 2014-09-19 11:18:35 -04:00
relcache.c Fix relcache for policies, and doc updates 2014-09-26 12:46:26 -04:00
relfilenodemap.c Don't allow to disable backend assertions via the debug_assertions GUC. 2014-06-20 11:09:17 +02:00
relmapper.c Switch to CRC-32C in WAL and other places. 2014-11-04 11:39:48 +02:00
spccache.c pgindent run for 9.4 2014-05-06 12:12:18 -04:00
syscache.c pgindent run for 9.4 2014-05-06 12:12:18 -04:00
ts_cache.c Update copyright for 2014 2014-01-07 16:05:30 -05:00
typcache.c pgindent run for 9.4 2014-05-06 12:12:18 -04:00