Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fvTSa-0000mK-DZ for pgsql-hackers@arkaria.postgresql.org; Thu, 30 Aug 2018 20:22:32 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fvTSY-0000Dj-PA for pgsql-hackers@arkaria.postgresql.org; Thu, 30 Aug 2018 20:22:30 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fvTSY-0000Dc-I8 for pgsql-hackers@lists.postgresql.org; Thu, 30 Aug 2018 20:22:30 +0000 Received: from gauss.credativ.com ([93.94.130.89]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fvTSV-0000tz-3e for pgsql-hackers@postgresql.org; Thu, 30 Aug 2018 20:22:30 +0000 Received: from gauss.credativ.com (localhost [127.0.0.1]) by gauss.credativ.com (Postfix) with ESMTP id A820F1E1A6E; Thu, 30 Aug 2018 22:22:25 +0200 (CEST) Received: from kohn.fritz.box (ppp-88-217-96-61.dynamic.mnet-online.de [88.217.96.61]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: mba@gauss.credativ.com) by gauss.credativ.com (Postfix) with ESMTPSA id 5371E1E199D; Thu, 30 Aug 2018 22:22:25 +0200 (CEST) Message-ID: <1535660544.1286.6.camel@credativ.de> Subject: Re: pg_verify_checksums and -fno-strict-aliasing From: Michael Banck To: Magnus Hagander , Tom Lane Cc: Fabien COELHO , pgsql-hackers Date: Thu, 30 Aug 2018 22:22:24 +0200 In-Reply-To: References: <1535618100.1286.3.camel@credativ.de> <7321.1535639966@sss.pgh.pa.us> Organization: credativ GmbH Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.22.6-1+deb9u1 Mime-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk 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.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