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 1gBRqT-000605-RD for pgsql-hackers@arkaria.postgresql.org; Sat, 13 Oct 2018 21:53:14 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gBRqP-0002Up-B9 for pgsql-hackers@arkaria.postgresql.org; Sat, 13 Oct 2018 21:53:09 +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 1gBRqO-0002Ui-W7 for pgsql-hackers@lists.postgresql.org; Sat, 13 Oct 2018 21:53:09 +0000 Received: from mail-qt1-x835.google.com ([2607:f8b0:4864:20::835]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gBRqK-000703-3J for pgsql-hackers@postgresql.org; Sat, 13 Oct 2018 21:53:08 +0000 Received: by mail-qt1-x835.google.com with SMTP id e22-v6so17645117qto.6 for ; Sat, 13 Oct 2018 14:53:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=from:subject:to:cc:references:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding:content-language; bh=yN+fEuHSS6ZBLx8SFwabzNWnhK4PcENEYhu8N7NAkdA=; b=Es2hRoCUBCsYSHamLaEMDq/jslgsh/xVHLzfRmEyu2NxLQ+TaYz6S2MuTkchEdgNX2 NjB/xVaqFU2zcQBqU0otXl8PmYR9uNE3NUyEb8hzzl3IlPb2DvX1VkJiWQ1om09Ko4AK 4dB42pRGNtGKfckmJrAuIxyZAz75ZEYBkwpAWLY5Yi0OxAz8acFeOy2EOSb2WAfZdHjM ksmVXFQVcwGN+SwPrv00nonyneOnDy2IXdWkhFCsOWGJUYJKgt8mQxPl7ZtEPF86a850 LhARgXYheVFpPbhm9li82EQ+q3BYvUwKSfyBCA9IFQjbCTvDwrr+DlEAtsHTlb//cDpe KaOQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:subject:to:cc:references:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=yN+fEuHSS6ZBLx8SFwabzNWnhK4PcENEYhu8N7NAkdA=; b=te/EO5FBME0+3AK8W1wM9Nr+7I3rDELb4eznLIxnJx50Smyib/HX36+yUN1Qux9FKI VWzKIUWjlpBNR7AYFbn3aFkP+56nhmkegORLY/zqoWYpEmqJ3MZ22KxZY3WfA1rdNn+v jLukdtI6II8J/TZX2aRvGK8wT8JYOPY1N62bldEy9j/x6pIno+U5tauQOQ3Etcqg6zw0 nnIWfaHMhJyD+EWns5KK+HVk2bylerg0ubGLTBZc/zDDYB7RUPaYOfOdUyvT7yh4sd7j IzMdSi4z2NQret3IdoCHdGXuGiYNDsvEN+lDO3oYu8CIXfGklryA5+dWshyxFAL7OO7p Y9vA== X-Gm-Message-State: ABuFfogSTj1ERlGS/W8Kmkutt8fR9c6O3ewml2zoxzZ3S1izLA/zqVHo h8JLWAfwmDkNyhmn3oEXMHZj6nzRDg== X-Google-Smtp-Source: ACcGV63+oM95p0XTEWHbgL7+PGdziBLBx1JDpV6U1N4g7/p5CHwPzAyk/bNqMeBXkCPVOoAXyOoUtA== X-Received: by 2002:a0c:b907:: with SMTP id u7mr2395916qvf.132.1539467581892; Sat, 13 Oct 2018 14:53:01 -0700 (PDT) Received: from [192.168.10.146] ([98.122.175.38]) by smtp.gmail.com with ESMTPSA id 128-v6sm2760056qko.7.2018.10.13.14.53.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 13 Oct 2018 14:53:01 -0700 (PDT) From: Andrew Dunstan X-Google-Original-From: Andrew Dunstan Subject: Re: pgsql: Add TAP tests for pg_verify_checksums To: Michael Paquier , Michael Banck Cc: Andres Freund , Postgres hackers , Daniel Gustafsson , Magnus Hagander References: <20181012005614.GC26424@paquier.xyz> <20181012010411.re53cwcistcpip5j@alap3.anarazel.de> <20181012013918.GA30064@paquier.xyz> <20181012015319.ezsb2cxb52ulbqgx@alap3.anarazel.de> <20181012020758.GB30064@paquier.xyz> <20181012024118.q3jwio7gf52nsrmm@alap3.anarazel.de> <20181012031158.GD30064@paquier.xyz> <20181012060543.GE30064@paquier.xyz> <20181012101447.GA13287@nighthawk.caipicrew.dd-dns.de> <20181013083040.GF30064@paquier.xyz> Message-ID: <1bce17ea-08f7-c480-fe69-a5f6467b461f@2ndQuadrant.com> Date: Sat, 13 Oct 2018 17:53:00 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-MW List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 10/13/2018 10:00 AM, Andrew Dunstan wrote: > > > On 10/13/2018 04:30 AM, Michael Paquier wrote: >> On Fri, Oct 12, 2018 at 12:14:48PM +0200, Michael Banck wrote: >>> On Fri, Oct 12, 2018 at 03:05:43PM +0900, Michael Paquier wrote: >>>> On Fri, Oct 12, 2018 at 12:11:58PM +0900, Michael Paquier wrote: >>>>> Agreed.  I am just working on a patch for v11- which uses a >>>>> whitelist-based method instead of what is present now. Reverting the >>>>> tests to put the buildfarm to green could be done, but that's not the >>>>> root of the problem. >>> I think that's the right solution; the online verification patch adds >>> even more logic to the blacklist so getting rid of it in favor of a >>> whitelist is +1 with me. >> Thanks Michael for the input! >> >>>> So, I have coded this thing, and finish with the attached.  The >>>> following file patterns are accepted for the checksums: >>>> . >>>> _ >>>> _. >>>> I have added some tests on the way to make sure that all the patterns >>>> get covered.  Please note that this skips the temporary files. >>> Maybe also add some correct (to be scanned) but non-empty garbage files >>> later on that it should barf on? >> I was not sure about doing that in the main patch so I tweaked manually >> the test to make sure that the tool still complained with "could not >> read block" as it should.  That's easy enough to add, so I'll add them >> with multiple file patterns.  Those are cheap checks as well if they are >> placed in global/. >> >> Another problem that the patch has is that it is not using >> forkname_to_number() to scan for all the fork types, and I forgot init >> forks in the previous version.  Using forkname_to_number() also makes >> the tool more bug-proof, it is also not complicated to plug into the >> existing patch. >> >> Anyway, I have a bit of a problem here, which prevents me to stay in >> front of a computer or to look at a screen for more than a couple of >> minutes in a row for a couple of days at least, and I don't like to keep >> the buildfarm unhappy for the time being.  There are three options: >> 1) Revert the TAP tests of pg_verify_checksums. >> 2) Push the patch which adds new entries for EXEC_BACKEND files in the >> skip list.  That's a short workaround, and that would allow default >> deployments of Postgres to use the tool. >> 3) Finish the patch with the whitelist approach. >> >> I can do 1) or 2) in my condition.  3) requires more work than I can do >> now, though the patch to do is getting in shape, so the buildfarm would >> stay unhappy.  Any preference of the course of action to take? > > > > I have disabled the test temporarily on my two animals since I want to > make sure they are working OK with other changes, and we know what the > problem is. Andres might want to do that with his animal also just add > "--skip-steps=pg_verify_checksums-check" to the command line. > > If you want to throw what you have for 3) over to wall to me I can see > if I can finish it. > It occurred to me that a pretty simple fix could just be to blacklist everything that didn't start with a digit. The whitelist approach is probably preferable  ... depends how urgent we see this as. cheers andrew -- Andrew Dunstan https://www.2ndQuadrant.com PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services