mirror of
https://github.com/postgres/postgres.git
synced 2025-11-19 13:42:17 +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:
@@ -1391,7 +1391,7 @@ typedef struct SnapBuildOnDisk
|
||||
|
||||
/* data not covered by checksum */
|
||||
uint32 magic;
|
||||
pg_crc32 checksum;
|
||||
pg_crc32c checksum;
|
||||
|
||||
/* data covered by checksum */
|
||||
|
||||
@@ -1634,7 +1634,7 @@ SnapBuildRestore(SnapBuild *builder, XLogRecPtr lsn)
|
||||
char path[MAXPGPATH];
|
||||
Size sz;
|
||||
int readBytes;
|
||||
pg_crc32 checksum;
|
||||
pg_crc32c checksum;
|
||||
|
||||
/* no point in loading a snapshot if we're already there */
|
||||
if (builder->state == SNAPBUILD_CONSISTENT)
|
||||
|
||||
Reference in New Issue
Block a user