Re: pgsql: Add TAP tests for pg_verify_checksums
От | Michael Banck |
---|---|
Тема | Re: pgsql: Add TAP tests for pg_verify_checksums |
Дата | |
Msg-id | 1543324145.17247.6.camel@credativ.de обсуждение исходный текст |
Ответ на | Re: pgsql: Add TAP tests for pg_verify_checksums (Michael Paquier <michael@paquier.xyz>) |
Ответы |
Re: pgsql: Add TAP tests for pg_verify_checksums
|
Список | pgsql-hackers |
Hi, Am Freitag, den 19.10.2018, 22:50 +0900 schrieb Michael Paquier: > On Wed, Oct 17, 2018 at 05:30:05PM -0400, Andrew Dunstan wrote: > Thanks. This is now committed after some tweaks to the comments, a bit > earlier than I thought first. I found an issue with this [d55241af7, "Use whitelist to choose files scanned with pg_verify_checksums"] commit, namely, it makes pg_verify_checksums no longer scan non-default tablespaces. So if you have all of your data in tablespaces, it will more-or-less immediately return with success. I've extended the test suite to induce corruption in a table located in a non-default tablespace, see the attached patch. If fails like this, i.e. does not detect the corruption: t/002_actions.pl .. 14/42 # Failed test 'fails with corrupted data in non-default tablespace status (got 0 vs expected 1)' # at t/002_actions.pl line 87. # Failed test 'fails with corrupted data in non-default tablespace stdout /(?^:Bad checksums:.*1)/' # at t/002_actions.pl line 87. # 'Checksum scan completed # Data checksum version: 1 # Files scanned: 1102 # Blocks scanned: 2861 # Bad checksums: 0 # ' # doesn't match '(?^:Bad checksums:.*1)' # Failed test 'fails with corrupted data in non-default tablespace stderr /(?^:checksum verification failed)/' # at t/002_actions.pl line 87. # '' # doesn't match '(?^:checksum verification failed)' # Looks like you failed 3 tests of 42. t/002_actions.pl .. Dubious, test returned 3 (wstat 768, 0x300) Failed 3/42 subtests The problem is that "PG_12_201811201" is not considered a valid relation file by isRelFileName(), so it skips it and the rest of the tablespace. I had a quick look at fixing this but did not manage to immediately come up with a solution, so posting here for now. Michael -- Michael Banck Projektleiter / Senior Berater Tel.: +49 2166 9901-171 Fax: +49 2166 9901-100 Email: michael.banck@credativ.de credativ GmbH, HRB Mönchengladbach 12080 USt-ID-Nummer: DE204566209 Trompeterallee 108, 41189 Mönchengladbach Geschäftsführung: Dr. Michael Meskes, Jörg Folz, Sascha Heuer Unser Umgang mit personenbezogenen Daten unterliegt folgenden Bestimmungen: https://www.credativ.de/datenschutz
Вложения
В списке pgsql-hackers по дате отправления: