Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1gDiHI-0007Sk-G0 for pgsql-hackers@arkaria.postgresql.org; Sat, 20 Oct 2018 03:50:17 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gDiHG-0004Ii-Ci for pgsql-hackers@arkaria.postgresql.org; Sat, 20 Oct 2018 03:50:14 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1gDiHF-0004IZ-1P for pgsql-hackers@lists.postgresql.org; Sat, 20 Oct 2018 03:50:14 +0000 Received: from wout1-smtp.messagingengine.com ([64.147.123.24]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1gDiHB-0001he-FL for pgsql-hackers@postgresql.org; Sat, 20 Oct 2018 03:50:11 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.west.internal (Postfix) with ESMTP id 94F8DC57; Fri, 19 Oct 2018 23:50:07 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Fri, 19 Oct 2018 23:50:08 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=anarazel.de; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm2; bh=eHcAnCmBC8fM11fNZYul1pfoi47 Nv0DA/INkvffW7Fw=; b=FRT0OVkOejmKiZlogyHzxWDLNPeh1Y/i4BoefAIM+3m oHc0yG3gmio1tAKLq5vA6wm97KMOWohBUrK9AN01RLLnIQWxQhTLdQfCUxtXc/ys dvunPuED5MyZoyty47VL6QTV/FhkN/3zkHpqPRLkNJG/xzRQWNBnqKtL9hRy4bXm GmCa8Ryuug+n1rdrLrWnmcOOTcCjeBWDZpzCXqZl+Kz+/RvlstPf9ivDM/KJlUmO PkNkQwJvC3LVzSACAaNuF2hoHp31R0f22JBmlfJaB/ud/K3kwk0iTgut5FFt4yXW j9E5lLAAuNG/1yWpZEVTot0c6U5tXFDmDDTid2peoPg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=eHcAnC mBC8fM11fNZYul1pfoi47Nv0DA/INkvffW7Fw=; b=BPCRVG1xTxftFBkKiQHoru sB8RUEFIXVZRp3HnApsHJ+ZdJ+3tE4PfMg+ITyv12A6tL3FhKhoP9urCTv9pNJ4i ZaeU76TZlAmqatQ+xtFsoaIvUedEdji1cwCvXvWcJcKG2zY/gvaabEUZBx0j+543 IstNzyGvKx6BluVqjenD+p57dU7NPleZoyYvCkaXwEoSla2xIDnDT7E1XuMN4PB0 gVsVmHOGmddwHHa2M8jhJvtXKLelOPASjKbyK7QS0n46AjFbnk5CpX3B9dQ1Z78K suYyRBBCeCGez9ILFCcVDex/S9VKmjvVTxR6YGqBTBDc6Bxqww5vbZrMle7273iw == X-ME-Sender: X-ME-Proxy: Received: from intern.anarazel.de (c-98-210-140-171.hsd1.ca.comcast.net [98.210.140.171]) by mail.messagingengine.com (Postfix) with ESMTPA id A2DB2102E4; Fri, 19 Oct 2018 23:50:05 -0400 (EDT) Date: Fri, 19 Oct 2018 20:50:04 -0700 From: Andres Freund To: Michael Paquier Cc: Tom Lane , Andrew Dunstan , Stephen Frost , Michael Banck , Postgres hackers , Daniel Gustafsson , Magnus Hagander Subject: Re: pgsql: Add TAP tests for pg_verify_checksums Message-ID: <20181020035004.7brmu7pkajlbdsp5@alap3.anarazel.de> References: <20181019184751.GP4184@tamriel.snowman.net> <20181019192146.j4my7yjzv4eitw2w@alap3.anarazel.de> <20181019195728.GQ4184@tamriel.snowman.net> <20181019200723.4byzaw5km5jvsxlc@alap3.anarazel.de> <20181019203546.GR4184@tamriel.snowman.net> <20181019205724.ewnuhvrsanacihzq@alap3.anarazel.de> <20181019213257.GS4184@tamriel.snowman.net> <16306.1539988998@sss.pgh.pa.us> <20181020033955.GA2553@paquier.xyz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181020033955.GA2553@paquier.xyz> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Hi, On 2018-10-20 12:39:55 +0900, Michael Paquier wrote: > - I agree with Stephen's point that we should decide if a file has > checksums or not in a single place, and that we should use the same > logic for base backups and pg_verify_checksums. To be clear, I wholeheartedly agree on that. We probably only want to tackle that for "is checksummable file" in a backpatchable fashion, but we probably should move to having more common infrastructure like that. > So what I think we ought to do is the following: > - Start a new thread, this one about TAP tests is not adapted. > - Add in src/common/relpath.c the API from d55241af called > isRelFileName(), make use of it in the base backup code, and basically > remove is_checksummed_file() and the checksum skip list. I think it probably shouldn't quite be that as an API. The code should not just check whether the file matches a pattern, but also importantly needs to exclude files that are in a temp tablespace. isRelFileName() doesn't quite describe an API meaning that. I assume we should keep something like isRelFileName() but use an API ontop of that that also exclude temp files / relations. Greetings, Andres Freund Date: Fri, 19 Oct 2018 20:48:02 -0700 Message-ID: <87in1xmg7h.fsf@alap4.lan>