forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitcc7f27e
committed
Use whitelist to choose files scanned with pg_verify_checksums
The original implementation of pg_verify_checksums used a blacklist todecide which files should be skipped for scanning as they do not includedata checksums, like pg_internal.init or pg_control. However, thismissed two things:- Some files are created within builds of EXEC_BACKEND and these werenot listed, causing failures on Windows.- Extensions may create custom files in data folders, causing the toolto equally fail.This commit switches to a whitelist-like method instead by checking ifthe files to scan are authorized relation files. This is close to areverse-engineering of what is defined in relpath.c in charge ofbuilding the relation paths, and we could consider refactoring what thispatch does so as all routines are in a single place. This is left forlater.This is based on a suggestion from Andres Freund. TAP tests are updatedso as multiple file patterns are tested. The bug has been spotted byvarious buildfarm members as a result ofb34e84f which has introducedthe TAP tests of pg_verify_checksums.Author: Michael PaquierReviewed-by: Andrew Dunstan, Michael BanckDiscussion:https://postgr.es/m/20181012005614.GC26424@paquier.xyzBackpatch-through: 111 parent06292bb commitcc7f27e
1 file changed
+61
-18
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
| |||
49 | 50 | | |
50 | 51 | | |
51 | 52 | | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
60 | 58 | | |
61 | | - | |
| 59 | + | |
62 | 60 | | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
67 | 86 | | |
68 | 87 | | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
73 | 116 | | |
74 | 117 | | |
75 | 118 | | |
| |||
146 | 189 | | |
147 | 190 | | |
148 | 191 | | |
149 | | - | |
| 192 | + | |
150 | 193 | | |
151 | 194 | | |
152 | 195 | | |
| |||
0 commit comments
Comments
(0)