postgresql/src/backend/utils
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
..
adt Switch to CRC-32C in WAL and other places. 2014-11-04 11:39:48 +02:00
cache Switch to CRC-32C in WAL and other places. 2014-11-04 11:39:48 +02:00
error Support frontend-backend protocol communication using a shm_mq. 2014-10-31 12:02:40 -04:00
fmgr pgindent run for 9.4 2014-05-06 12:12:18 -04:00
hash pgindent run for 9.4 2014-05-06 12:12:18 -04:00
init Add a function to get the authenticated user ID. 2014-10-23 08:18:45 -04:00
mb Add file version information to most installed Windows binaries. 2014-07-14 14:07:52 -04:00
misc Allow setting effective_io_concurrency even on unsupported systems 2014-10-18 21:35:46 -04:00
mmgr Fix and enhance the assertion of no palloc's in a critical section. 2014-06-30 10:26:00 +03:00
resowner pgindent run for 9.4 2014-05-06 12:12:18 -04:00
sort Update comment. 2014-10-22 15:44:07 +03:00
time Fix typos. 2014-10-20 10:23:40 -04:00
.gitignore Avoid maintaining three separate copies of the error codes list. 2011-02-03 22:32:49 -05:00
Gen_dummy_probes.sed Update copyright for 2014 2014-01-07 16:05:30 -05:00
Gen_fmgrtab.pl Update copyright for 2014 2014-01-07 16:05:30 -05:00
Makefile Make handling of errcodes.h more consistent with other generated headers. 2011-02-04 09:29:10 -05:00
errcodes.txt Update copyright for 2014 2014-01-07 16:05:30 -05:00
generate-errcodes.pl Update copyright for 2014 2014-01-07 16:05:30 -05:00
probes.d Fix build with LWLOCK_STATS or dtrace. 2014-03-21 23:26:34 +01:00