mirror of
https://github.com/postgres/postgres.git
synced 2025-06-30 21:42:05 +03:00
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.
This commit is contained in:
@ -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.
|
||||
|
Reference in New Issue
Block a user