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 1gDVti-0005GV-VA for pgsql-hackers@arkaria.postgresql.org; Fri, 19 Oct 2018 14:37:07 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gDVtg-0000hR-LX for pgsql-hackers@arkaria.postgresql.org; Fri, 19 Oct 2018 14:37:04 +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 1gDVtg-0000hK-6K for pgsql-hackers@lists.postgresql.org; Fri, 19 Oct 2018 14:37:04 +0000 Received: from tamriel.snowman.net ([2001:470:e38f::11]) by makus.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gDVtc-0000R8-Ve for pgsql-hackers@postgresql.org; Fri, 19 Oct 2018 14:37:02 +0000 Received: by tamriel.snowman.net (Postfix, from userid 1000) id C2EFD5F79C; Fri, 19 Oct 2018 10:36:59 -0400 (EDT) Date: Fri, 19 Oct 2018 10:36:59 -0400 From: Stephen Frost To: Michael Paquier Cc: Andrew Dunstan , Tom Lane , Michael Banck , Andres Freund , Postgres hackers , Daniel Gustafsson , Magnus Hagander Subject: Re: pgsql: Add TAP tests for pg_verify_checksums Message-ID: <20181019143659.GJ4184@tamriel.snowman.net> References: <20181014015902.GI30064@paquier.xyz> <20181014224138.GA15473@paquier.xyz> <11414.1539615900@sss.pgh.pa.us> <20181016220900.GA2331@paquier.xyz> <61121849-19c2-ca27-a928-08aacc0f1105@2ndQuadrant.com> <20181019135009.GG2099@paquier.xyz> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="Zj/QW1vSKR6Wmu8c" Content-Disposition: inline In-Reply-To: <20181019135009.GG2099@paquier.xyz> User-Agent: Mutt/1.5.24 (2015-08-30) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --Zj/QW1vSKR6Wmu8c Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Greetings, * Michael Paquier (michael@paquier.xyz) wrote: > On Wed, Oct 17, 2018 at 05:30:05PM -0400, Andrew Dunstan wrote: > > Fine by me. >=20 > Thanks. This is now committed after some tweaks to the comments, a bit > earlier than I thought first. I just saw this committed and I'm trying to figure out why we are creating yet-another-list when it comes to deciding what should be checksum'd and what shouldn't be. Specifically, pg_basebackup (or, really, src/backend/replication/basebackup.c) has 'is_checksummed_file' which operates differently from pg_verify_checksum with this change, and that seems rather wrong. Maybe we need to fix both places but I *really* don't like this approach of "well, we'll just guess if the file should have a checksum or not" and it certainly seems likely that we'll end up forgetting to update this when we introduce things in the future which have checksums (which seems pretty darn likely to happen). 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. Basically, I think this commit should be reverted, we should go back to having a blacklist, update it in both places (and add comments to both places to make it clear that this list exists in two different places) and add code to handle the temp tablespace case explicitly. Even better would be to find a way to expose the list and the code for walking the directories and identifying the files which contain checksums, so that we're only doing that in one place instead of multiple different places. Thanks! Stephen --Zj/QW1vSKR6Wmu8c Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBCgAGBQJbyewLAAoJEO1sijiDR2RV4e8QAJZ1RSnY/6cR2SiasSQ7xpup F3oFtza4Mfvh1LU+SLCE+Xplo83LicE6pZS96PGNHDyG9bRgzk0OXxzr8SZasPDP sFuBXMeFtXtGYk/oc2oPkkVPQJ2l6115egLclNj2I4T3jI07ruUYBz8REUYhZxRd ldyyFT382B/atUO6REDU83rjN21a8wIgWmSBA+J9+BbZSA9BLFin4axL9bMigU4q XmbXoA0EnFOq6NIZZsfGqpFo0VbJmxgpbftNmklJZyoo28JgFbFR7cST/5gZSgdd iXUwSucziEgEyI1zO+KdQeOwWbkJlyqEk/NaOD8HfPhBqStRl8uh4qxKTnDBgLlF k6U6Y3a/TrBYO17ALGs26SJ/iAW7ZEVE4Wbclh8FnXTw4+WGC0NLMZeE/EX2i+K2 1uHFByPilOD+xLbPX1NnJyb1XM/VXlDdqJF7STsCPFLx1lEM5qLblppaOBbZGTRA /gtLaJGol84R5zmzkGHCXBMsg7/D3+imiFlSeNzuznJZO+1bG8Hu8wO4E1ARSZkq pzj/p06iLIa0e0vxBpaF+y16Q+93Y/tE7TyNJ3PzfZYuocEyHElq/pA2iL7GnfB5 vm5qseXhINfROAFZahLM5PZncQ7tbW05afcem9mYGVT4HjGkEpjNJIHkAsdEDm2p R3r864DFbpwnLfArjG3s =4+Ux -----END PGP SIGNATURE----- --Zj/QW1vSKR6Wmu8c--