Hi, Am Donnerstag, den 30.08.2018, 22:02 +0200 schrieb Magnus Hagander: > PFA some *very* basic tests for pg_verify_checksums, which should at > least be enough to catch the kind of errors we had now in the tool > itself.
I proposed something similar for pg_basebackup back then and IIRC Peter (rightfully) complained that using a system catalog for that wasn't so great - also, are you sure the relfilenode will always be stable? Then again, this is obviously a throw-away data directory so it should be no general issue, just a matter of taste. https://github.com/credativ/pg_checksums/blob/master/t/001_checksums.pl has some similar tests at the end but creates a table for corruption, adds some safeguards for block size and also uses command_checks_all() to parse the output. It's PGDG licensed so you're welcome to take some or all of that. Michael -- Michael Banck Projektleiter / Senior Berater Tel.: +49 2166 9901-171 Fax: +49 2166 9901-100 Email: michael.ba...@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