postgresql/src/backend/postmaster
Tom Lane a7a7387575 Further improve code for probing the availability of ARM CRC instructions.
Andrew Gierth pointed out that commit 1c72ec6f4 would yield the wrong
answer on big-endian ARM systems, because the data being CRC'd would be
different.  To fix that, and avoid the rather unsightly hard-wired
constant, simply compare the hardware and software implementations'
results.

While we're at it, also log the resulting decision at DEBUG1, and error
out if the hw and sw results unexpectedly differ.  Also, since this
file must compile for both frontend and backend, avoid incorrect
dependencies on backend-only headers.

In passing, add a comment to postmaster.c about when the CRC function
pointer will get initialized.

Thomas Munro, based on complaints from Andrew Gierth and Tom Lane

Discussion: https://postgr.es/m/HE1PR0801MB1323D171938EABC04FFE7FA9E3110@HE1PR0801MB1323.eurprd08.prod.outlook.com
2018-05-03 11:32:57 -04:00
..
autovacuum.c In AtEOXact_Files, complain if any files remain unclosed at commit. 2018-04-28 17:45:02 -04:00
bgworker.c Revert "Allow on-line enabling and disabling of data checksums" 2018-04-09 19:03:42 +02:00
bgwriter.c In AtEOXact_Files, complain if any files remain unclosed at commit. 2018-04-28 17:45:02 -04:00
checkpointer.c In AtEOXact_Files, complain if any files remain unclosed at commit. 2018-04-28 17:45:02 -04:00
fork_process.c Update copyright for 2018 2018-01-02 23:30:12 -05:00
Makefile Revert "Allow on-line enabling and disabling of data checksums" 2018-04-09 19:03:42 +02:00
pgarch.c Update copyright for 2018 2018-01-02 23:30:12 -05:00
pgstat.c Allocate enough shared string memory for stats of auxiliary processes. 2018-04-11 23:39:49 +03:00
postmaster.c Further improve code for probing the availability of ARM CRC instructions. 2018-05-03 11:32:57 -04:00
startup.c Update copyright for 2018 2018-01-02 23:30:12 -05:00
syslogger.c Refactor dir/file permissions 2018-04-07 17:45:39 -04:00
walwriter.c In AtEOXact_Files, complain if any files remain unclosed at commit. 2018-04-28 17:45:02 -04:00