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 1gBKTC-00079S-QG for pgsql-hackers@arkaria.postgresql.org; Sat, 13 Oct 2018 14:00:43 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gBKT8-0002L7-Gg for pgsql-hackers@arkaria.postgresql.org; Sat, 13 Oct 2018 14:00:38 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1gBKT7-0002Kc-9V for pgsql-hackers@lists.postgresql.org; Sat, 13 Oct 2018 14:00:38 +0000 Received: from mail-qt1-x82e.google.com ([2607:f8b0:4864:20::82e]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gBKSy-0001Vk-LB for pgsql-hackers@postgresql.org; Sat, 13 Oct 2018 14:00:35 +0000 Received: by mail-qt1-x82e.google.com with SMTP id l9-v6so16888247qtf.5 for ; Sat, 13 Oct 2018 07:00:28 -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=pD0vLP8IfCt15SMaEQUmTeTFW3eApmDu71ueADBXrP8=; b=spz75pUPSTxMfX4fGMQOS/XftSTOnK6Jp8vN3il4haDdGPINevQ3sM7H9FLpkQfKbQ TWX1QrZLoGQO58TgxBDGeGUz4qUkuDinWSgvUAT3le55J/8uWTsKb8ZfkUQhJAhmeTEe F1IevoJXTv5yXlWLjK1sI/4RF2dmR4T3TKQYKzOHLSuE+gwjKJynoePjgQKmx67ewJBO t3WsX9/pB5ymriIP0xjpI0wjziKoI0qkdrl29GZHKMnvFsaNDrr8xeGaNj/kXda0vwbR ci1bBCaa4veh7B2t7XXbcLAsQxB7UAMXLoHMvZnAkIZQoHhAY66mGkwMFqs6HmddnhF+ c5vQ== 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=pD0vLP8IfCt15SMaEQUmTeTFW3eApmDu71ueADBXrP8=; b=iFunK82x9c5pp3o85c52NHab84nOWtdZMElYFaTGozD8hTTYvqABO3fwSnyQ7lO+SM rqRHTnis2kRA7Owd015RkNDE0tDwqwP9604ShC7PSR5IE34l5jP6P+YsH0hEpp16ntU1 mSGtmgB5s08y3BzXqhzV2yij6imBZ4Dx/B4JPKA66catZLKZWLlfZbio0C/euJOSMM1A Yk8hqpKHMXZjn/BhbwDo3L6tLTnVCiYHhyOeYIDAa+bqCUvFGDq5ODGHIgY95b6T0PPs obV6l5XQ9UjIap8xeQGc3EV0KkBbudv9w/Nby+9Vu14EzeSX90/MfOWD/4rso/CzOssi UaSw== X-Gm-Message-State: ABuFfojdrZHIEYvjKqFm7NkeqO2FeDPrDG2niryte9ym01WXuXmIQqi4 fVPSuAZNALj8Is55nwXpdOme X-Google-Smtp-Source: ACcGV62l0ez1cRYBE1GK5QCat2CwrIopUiLrja0OfjCdtZb4YL5CWxiZYDJfdZWCqHeY4CBLN8+2bw== X-Received: by 2002:ac8:4a11:: with SMTP id x17-v6mr9661084qtq.232.1539439227478; Sat, 13 Oct 2018 07:00:27 -0700 (PDT) Received: from [192.168.10.146] ([98.122.175.38]) by smtp.gmail.com with ESMTPSA id y50-v6sm2232349qta.60.2018.10.13.07.00.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 13 Oct 2018 07:00:26 -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: Date: Sat, 13 Oct 2018 10:00:25 -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: <20181013083040.GF30064@paquier.xyz> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-MW List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk 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. cheers andrew -- Andrew Dunstan https://www.2ndQuadrant.com PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services