Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jJFX7-0004nO-QO for pgsql-hackers@arkaria.postgresql.org; Tue, 31 Mar 2020 11:58:17 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jJFX6-00010J-PP for pgsql-hackers@arkaria.postgresql.org; Tue, 31 Mar 2020 11:58:16 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jJFX6-0000z0-IK for pgsql-hackers@lists.postgresql.org; Tue, 31 Mar 2020 11:58:16 +0000 Received: from tamriel.snowman.net ([2001:470:e38f::11]) by makus.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jJFX3-0000T0-Qx for pgsql-hackers@postgresql.org; Tue, 31 Mar 2020 11:58:15 +0000 Received: by tamriel.snowman.net (Postfix, from userid 1000) id 429AE5F7A0; Tue, 31 Mar 2020 07:58:15 -0400 (EDT) Date: Tue, 31 Mar 2020 07:58:15 -0400 From: Stephen Frost To: Amit Kapila Cc: Noah Misch , Andres Freund , Robert Haas , David Steele , Suraj Kharage , tushar , Rajkumar Raghuwanshi , Rushabh Lathia , Tels , Andrew Dunstan , PostgreSQL Hackers , Jeevan Chalke , vignesh C Subject: Re: backup manifests Message-ID: <20200331115815.GU13712@tamriel.snowman.net> References: <16538d02-fd4b-6c4f-81a5-132c8fe8c3e9@pgmasters.net> <20200329034010.GB2247658@rfd.leadboat.com> <20200330055854.GC2324620@rfd.leadboat.com> <20200330191631.yjgvpdfd6u3raebw@alap3.anarazel.de> <20200331054014.GA3354091@rfd.leadboat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="uirbBhP+oL+JcCcl" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --uirbBhP+oL+JcCcl Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Greetings, * Amit Kapila (amit.kapila16@gmail.com) wrote: > On Tue, Mar 31, 2020 at 11:10 AM Noah Misch wrote: > > On Mon, Mar 30, 2020 at 12:16:31PM -0700, Andres Freund wrote: > > > On 2020-03-30 15:04:55 -0400, Robert Haas wrote: > > > > I guess I'd like to be clear here that I have no fundamental > > > > disagreement with taking this tool in any direction that people wou= ld > > > > like it to go. For me it's just a question of timing. Feature freeze > > > > is now a week or so away, and nothing complicated is going to get d= one > > > > in that time. If we can all agree on something simple based on > > > > Andres's recent proposal, cool, but I'm not yet sure that will be t= he > > > > case, so what's plan B? We could decide that what I have here is ju= st > > > > too little to be a viable facility on its own, but I think Stephen = is > > > > the only one taking that position. We could release it as > > > > pg_validatemanifest with a plan to rename it if other backup-related > > > > checks are added later. We could release it as pg_validatebackup wi= th > > > > the idea to avoid having to rename it when more backup-related chec= ks > > > > are added later, but with a greater possibility of confusion in the > > > > meantime and no hard guarantee that anyone will actually develop su= ch > > > > checks. We could put it in to pg_checksums, but I think that's real= ly > > > > backing ourselves into a corner: if backup validation develops other > > > > checks that are not checksum-related, what then? I'd much rather > > > > gamble on keeping things together by topic (backup) than technology > > > > used internally (checksum). Putting it into pg_basebackup is another > > > > option, and would avoid that problem, but it's not my preferred > > > > option, because as I noted before, I think the command-line options > > > > will get confusing. > > > > > > I'm mildly inclined to name it pg_validate, pg_validate_dbdir or > > > such. And eventually (definitely not this release) subsume pg_checksu= ms > > > in it. That way we can add other checkers too. > > > > Works for me; of those two, I prefer pg_validate. >=20 > pg_validate sounds like a tool with a much bigger purpose. I think > even things like amcheck could also fall under it. Yeah, I tend to agree with this. > This patch has two parts (a) Generate backup manifests for base > backups, and (b) Validate backup (manifest). It seems to me that > there are not many things pending for (a), can't we commit that first > or is it the case that (a) depends on (b)? This is *not* a suggestion > to leave pg_validatebackup from this release rather just to commit if > something is ready and meaningful on its own. I suspect the idea here is that we don't really want to commit something that nothing is actually using, and that's understandable and justified here- consider that even in this recent discussion there was talk that maybe we should have included permissions and ownership in the manifest, or starting and ending WAL positions, so that they'd be able to be checked by this tool more easily (and because it's just useful to have all that info in one place... I don't really agree with the concerns that it's an issue for static information like that to be duplicated). In other words, while the manifest creation code might be something we could commit, without a tool to use it (which does all the things that we think it needs to, to perform some high-level task, such as "validate a backup") we don't know that the manifest that's actually generated is really up to snuff and has what it needs to have to perform that task. I had been hoping that the discussion Andres was leading regarding leveraging pg_waldump (or maybe just code from it..) would get us to a point where pg_validatebackup would check that we have all of the WAL needed for the backup to be consistent and that it would then verify the internal checksums of the WAL. That would certainly be a good solution for this time around, in my view, and is already all existing client-side code. I do think we'd want to have a note about how we verify pg_wal differently from the other files which are in the manifest. Thanks, Stephen --uirbBhP+oL+JcCcl Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBCgAGBQJegzBWAAoJEO1sijiDR2RVpG4QAInDv8QmFtCc8pyiUFofVggh rsEKb8mFNUkXCpvSqH+6PE3yc/OvtosVDHiM7+eZfFtELc3pxBY4L562UXiNJrco XJrUXoYQQ0Q4tWnMlfducbjJHiUikLRDMLlUmKVpamWVP8bLQAmUmSIrqf5j8nVF +cZnfxboKo35FfqV+UNQBMWOfcgWX2+ljDjYYR58e7hbAqe8CA7IEfNy2uL3dGFj n0qgKHp9QlFDYBgl22Vf1VoZF8xQl0nuNou4cHK+2ZU1e1oVjbFCMKfaLx9/hknv c24Zh87dM5110HD93lYPxWwnJ5p9KNOnIoGPBuFNhG0HDoKqZHNRDbOJFCqALlM3 vmJZYtmPkZFMBvaIvUB3llRFwnMWEeAr78Lc6VRzkREeqdMKo09EfQze1x4uKWAN fV01LBvxzj3Z6H2fCwg8ZYAJixhEM8Gh2ygTh4f4iIgqotYEtFc22Q0yvFlNZxw6 p3WcdML13W3ZWFfTNyj3kPjkx3itibr8si/qnjfZ6P8u6cjMGEN6fRPwjHhp+5PD CtKGOzqlDuy9k/BiSVSHQ6pK4QNkKSfj8OJ5aPieZg7XdDqHyfXCb4fBclQJk7Dj uo/wCfkhxYqMYVvqns3KGKmXMpwy7uA5YynDs1H6wU4HjXjrtTuCVUcXx0VbgbLK +swERs/Pz8DJylaTtzMJ =k/vJ -----END PGP SIGNATURE----- --uirbBhP+oL+JcCcl--