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 1gDZ3P-000667-9R for pgsql-hackers@arkaria.postgresql.org; Fri, 19 Oct 2018 17:59:19 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gDZ3M-0007SE-Tl for pgsql-hackers@arkaria.postgresql.org; Fri, 19 Oct 2018 17:59:16 +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 1gDZ3M-0007S6-JB for pgsql-hackers@lists.postgresql.org; Fri, 19 Oct 2018 17:59:16 +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 1gDZ3J-0004mN-L4 for pgsql-hackers@postgresql.org; Fri, 19 Oct 2018 17:59:15 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.west.internal (Postfix) with ESMTP id 8C7EEC57; Fri, 19 Oct 2018 13:59:11 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Fri, 19 Oct 2018 13:59:12 -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=LF1pFnyp/CMAd47umSWGCqIcJ9z RablqTTcRKAQoN04=; b=uG1xO6tDsKWTyjCXc+JUn1+oAbTrImKh3yrykTx82+7 my1kc6OYSRheCrpX18zKhgdH/MoXtow9AM7tz3hlbWYFbScP8vr4H0ECtHuIjI/o 1JQPg+IP2Tetbtc2gLVCzZlsmdYdrtqg+oQ9Q7lSLRcznvzgvjOmZ1VAFqnhDpTt NN9jmxelS5px+uZAXks68XK+ioDIz3bUXkvZXbdROnS4KrDY/ITIeaXQXvT1ufiW v3ZsGiNww8kDavref6zjcaeteUtqb198mXo5sP/F14ivl7ojY5uO07Aihsj2GzL2 iCo4//n3X/5PT3dEikfLJTNkkkvKWfgVtD/FFrhEDtw== 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=LF1pFn yp/CMAd47umSWGCqIcJ9zRablqTTcRKAQoN04=; b=cHN52CcC9x+i1Tt+30p1MA DNoyoNvt8tTVqwMXVI1E75oRuBSxcHiNGQUpQKJ2l61LgT9Qz5Jab8/PGOka251u 65p+hKNkN2zL7nGupebPYYvcA82Yl3GjuQRt/02UiNJIUugTuKV8c+nHCArqwDfB 8Aq6hxYMM7RhgcLz18jqvOPcQM4JGe+phhQgTUTIztEfrMF/tIbZLDOwaqFwPfsr HLlQvVb1AyIH/eX3sYJilAOnHreXcuoKBiMCl623QpgP9y6JLnoeAtkXslRIRVPp 0+HmjsALxMEr8rFWxP9MdYevg/Tn1e3lsE+/HREndIpWMlbJpKZtcmst9dP1wvlw == 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 CDC8DE447F; Fri, 19 Oct 2018 13:59:09 -0400 (EDT) Date: Fri, 19 Oct 2018 10:59:08 -0700 From: Andres Freund To: Stephen Frost Cc: Michael Paquier , Andrew Dunstan , Tom Lane , Michael Banck , Postgres hackers , Daniel Gustafsson , Magnus Hagander Subject: Re: pgsql: Add TAP tests for pg_verify_checksums Message-ID: <20181019175908.kc67mfxdlguckask@alap3.anarazel.de> References: <11414.1539615900@sss.pgh.pa.us> <20181016220900.GA2331@paquier.xyz> <61121849-19c2-ca27-a928-08aacc0f1105@2ndQuadrant.com> <20181019135009.GG2099@paquier.xyz> <20181019143659.GJ4184@tamriel.snowman.net> <20181019171747.4uithw2sjkt6msne@alap3.anarazel.de> <20181019175228.GN4184@tamriel.snowman.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181019175228.GN4184@tamriel.snowman.net> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Hi, On 2018-10-19 13:52:28 -0400, Stephen Frost wrote: > > > I also categorically disagree with the notion that it's ok for > > > extensions to dump files into our tablespace diretories or that we > > > should try to work around random code dumping extra files in the > > > directories which we maintain- it's not like this additional code will > > > actually protect us from that, after all, and it's foolish to think we > > > really could protect against that. > > > > I'm unconvinced. There already are extensions doing so, and it's not > > like we've given them any sort of reasonable alternative. You can't just > > create relations in a "registered" / "supported" kinda way right now, so > > uh, yea, extension gotta make do. And that has worked for many years. > > I don't agree that any of this is an argument for accepting random code > writing into arbitrary places in the data directory or tablespace > directories as being something which we support or which we write code > to work-around. > > If this is a capability that extension authors need then I'm all for > having a way for them to have that capability in a clearly defined and > documented way- and one which we could actually write code to handle and > work with. cstore e.g. does this, and it's already out there. So yes, we should provide better infrastructure. But for now, we gotta deal with reality, unless we just want to gratuituously break things. > > And I fail to see why a blacklist is architecturally better. There's > > plenty cases where we might want to create temporary files, > > non-checksummed data or such that we'd need a teach a blacklist about, > > but there's far fewer cases where add new checksummed files. Basically > > never since checksums have been introduced. And if checksums were > > introduced for something new, say slrus, we'd ceertainly use > > pg_verify_checksum during development. > > In cases where we need something temporary, we're going to need to be > prepared to clean those up and we had better make it very plain that > they're temporary and easy to write code for. Anything we aren't > prepared to blow away on a crash-restart should be checksum'd and in an > ideal world, we'd be looking to reduce the blacklist to only those > things which are temporary. There's pending patches that add support for pg_verify_checksums running against a running cluster. We'll not just need to recognize files that are there after a graceful shutdown, but with anything that a cluster can have there while running. > Of course, we may need different code for > calculating the checksum of different types of files, which moves it > from really being a 'blacklist' to a list of file-types and their > associated checksum'ing mechansim. Which pretty much is a whitelist. Given that we need a filetype->checksumtype mapping or something, how is a blacklist a reasonable approach for this? Greetings, Andres Freund