From 4f700bcd20c087f60346cb8aefd0e269be8e2157 Mon Sep 17 00:00:00 2001 From: Heikki Linnakangas Date: Tue, 14 Apr 2015 17:03:42 +0300 Subject: Reorganize our CRC source files again. Now that we use CRC-32C in WAL and the control file, the "traditional" and "legacy" CRC-32 variants are not used in any frontend programs anymore. Move the code for those back from src/common to src/backend/utils/hash. Also move the slicing-by-8 implementation (back) to src/port. This is in preparation for next patch that will add another implementation that uses Intel SSE 4.2 instructions to calculate CRC-32C, where available. --- src/backend/access/transam/xlog.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/backend/access/transam/xlog.c') diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c index 5688268c72d..975eac0c22b 100644 --- a/src/backend/access/transam/xlog.c +++ b/src/backend/access/transam/xlog.c @@ -862,7 +862,7 @@ XLogRecPtr XLogInsertRecord(XLogRecData *rdata, XLogRecPtr fpw_lsn) { XLogCtlInsert *Insert = &XLogCtl->Insert; - pg_crc32 rdata_crc; + pg_crc32c rdata_crc; bool inserted; XLogRecord *rechdr = (XLogRecord *) rdata->data; bool isLogSwitch = (rechdr->xl_rmid == RM_XLOG_ID && @@ -4179,7 +4179,7 @@ WriteControlFile(void) static void ReadControlFile(void) { - pg_crc32 crc; + pg_crc32c crc; int fd; /* @@ -4681,7 +4681,7 @@ BootStrapXLOG(void) bool use_existent; uint64 sysidentifier; struct timeval tv; - pg_crc32 crc; + pg_crc32c crc; /* * Select a hopefully-unique system identifier code for this installation. -- cgit v1.2.3