postgresql/src
Michael Paquier cc7f27eae8 Use whitelist to choose files scanned with pg_verify_checksums
The original implementation of pg_verify_checksums used a blacklist to
decide which files should be skipped for scanning as they do not include
data checksums, like pg_internal.init or pg_control.  However, this
missed two things:
- Some files are created within builds of EXEC_BACKEND and these were
not listed, causing failures on Windows.
- Extensions may create custom files in data folders, causing the tool
to equally fail.

This commit switches to a whitelist-like method instead by checking if
the files to scan are authorized relation files.  This is close to a
reverse-engineering of what is defined in relpath.c in charge of
building the relation paths, and we could consider refactoring what this
patch does so as all routines are in a single place.  This is left for
later.

This is based on a suggestion from Andres Freund.  TAP tests are updated
so as multiple file patterns are tested.  The bug has been spotted by
various buildfarm members as a result of b34e84f which has introduced
the TAP tests of pg_verify_checksums.

Author: Michael Paquier
Reviewed-by: Andrew Dunstan, Michael Banck
Discussion: https://postgr.es/m/20181012005614.GC26424@paquier.xyz
Backpatch-through: 11
2018-10-19 22:45:07 +09:00
..
backend Add missing quote_identifier calls for CREATE TRIGGER ... REFERENCING. 2018-10-19 00:50:16 -04:00
bin Use whitelist to choose files scanned with pg_verify_checksums 2018-10-19 22:45:07 +09:00
common Revert "Allow concurrent-safe open() and fopen() in frontend code for Windows" 2018-09-18 17:28:27 -04:00
fe_utils Fix lexing of standard multi-character operators in edge cases. 2018-08-23 21:43:51 +01:00
include Stamp 11.0. 2018-10-15 17:12:02 -04:00
interfaces Translation updates 2018-10-08 12:03:54 +02:00
makefiles Refactor installation of extension headers. 2018-09-07 14:30:15 +01:00
pl Still further rethinking of build changes for macOS Mojave. 2018-10-18 14:55:23 -04:00
port Set snprintf.c's maximum number of NL arguments to be 31. 2018-10-02 12:41:28 -04:00
template Still further rethinking of build changes for macOS Mojave. 2018-10-18 14:55:23 -04:00
test Fix minor bug in isolationtester. 2018-10-17 15:06:38 -04:00
timezone Improve tzparse's handling of TZDEFRULES ("posixrules") zone data. 2018-10-17 12:26:48 -04:00
tools Fix out-of-tree build for transform modules. 2018-09-16 19:13:59 +01:00
tutorial Update copyright for 2018 2018-01-02 23:30:12 -05:00
.gitignore
DEVELOPERS
Makefile Fix partial-build problems introduced by having more generated headers. 2018-04-09 16:42:10 -04:00
Makefile.global.in Still further rethinking of build changes for macOS Mojave. 2018-10-18 14:55:23 -04:00
Makefile.shlib Use -Bsymbolic for shared libraries on HP-UX and Solaris. 2018-09-10 22:22:12 -04:00
nls-global.mk nls-global.mk: search build dir for source files, too 2016-06-07 18:55:18 -04:00