Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.92) (envelope-from ) id 1jHwCh-0006Jd-PN for pgsql-hackers@arkaria.postgresql.org; Fri, 27 Mar 2020 21:07:47 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1jHwCg-0001c7-KD for pgsql-hackers@arkaria.postgresql.org; Fri, 27 Mar 2020 21:07:46 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1jHwCg-0001c0-Aa for pgsql-hackers@lists.postgresql.org; Fri, 27 Mar 2020 21:07:46 +0000 Received: from tamriel.snowman.net ([2001:470:e38f::11]) by magus.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jHwCZ-0008N4-Mh for pgsql-hackers@postgresql.org; Fri, 27 Mar 2020 21:07:45 +0000 Received: by tamriel.snowman.net (Postfix, from userid 1000) id 4E4CA5F798; Fri, 27 Mar 2020 17:07:42 -0400 (EDT) Date: Fri, 27 Mar 2020 17:07:42 -0400 From: Stephen Frost To: Andres Freund Cc: Robert Haas , David Steele , Amit Kapila , Suraj Kharage , tushar , Rajkumar Raghuwanshi , Rushabh Lathia , Tels , Andrew Dunstan , PostgreSQL Hackers , Jeevan Chalke , vignesh C Subject: Re: backup manifests Message-ID: <20200327210742.GJ13712@tamriel.snowman.net> References: <20200323224217.GN13712@tamriel.snowman.net> <20200325133106.GS13712@tamriel.snowman.net> <20200325205433.GV13712@tamriel.snowman.net> <16538d02-fd4b-6c4f-81a5-132c8fe8c3e9@pgmasters.net> <20200327201222.3iybtw4ipv3yxujj@alap3.anarazel.de> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="s7CsBtDqQs5UqHUm" Content-Disposition: inline In-Reply-To: <20200327201222.3iybtw4ipv3yxujj@alap3.anarazel.de> User-Agent: Mutt/1.5.24 (2015-08-30) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --s7CsBtDqQs5UqHUm Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Greetings, * Andres Freund (andres@anarazel.de) wrote: > On 2020-03-27 14:34:19 -0400, Robert Haas wrote: > > I think #2 is an interesting idea and could possibly reduce the danger > > of user confusion on this point considerably - because, let's face it, > > not everyone is going to read the documentation. However, I'm having a > > hard time figuring out exactly what we'd print. Right now on success, > > unless you specify -q, you get: > >=20 > > [rhaas ~]$ pg_validatebackup ~/pgslave > > backup successfully verified > >=20 > > But it feels strange and possibly confusing to me to print something li= ke: > >=20 > > [rhaas ~]$ pg_validatebackup ~/pgslave > > backup successfully verified (except for pg_wal) >=20 > You could print something like: > WAL necessary to restore this base backup can be validated with: >=20 > pg_waldump -p ~/pgslave -t tl -s backup_start_location -e backup_end_loc = > /dev/null && echo true >=20 > Obviously that specific invocation sucks, but it'd not be hard to add an > option to waldump to not output anything. Interesting idea to use pg_waldump. I had suggested up-thread, and I'm still fine with, having pg_validatebackup scan the WAL and check the internal checksums. I'd prefer an option that uses hashes to check when the user has asked for hashes with SHA256 or something, but at least scanning the WAL and making sure it validates its internal checksum (and is actually all there, which is pretty darn critical) would be enough to say that we're pretty sure the backup is valid. Thanks, Stephen --s7CsBtDqQs5UqHUm Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBCgAGBQJefmsdAAoJEO1sijiDR2RVZmsP/jFozXAt2L44xxWSDLj/mZ+x HfDfjPIvyv3S4OnwlEmOQsFwi+FEUI6Wol78W4zuuejwweoqxcPjLwkioXJOHx0T 9qjmNT2O/PcUak8sW2bH6wqp2x5uVYZhJ6ckcZmGbQ0MDIfi9Kjmxob9QxppgKfY Coh+gvWqb8RA4lulDzOW/vsx0wl5sqR/EmRSkrKtQrRPNYtZKqEv9+GMxe6UdUTi 61oh9E07V9sNOOjCzL2iE0Klvs/OPL1a3FMsu27L+hTpjo1ANk5Pa5v+B1bbP6nL uLtFDivhzDmZdyiWW9JfnvubWHl0FVIq+u6Vvew6C5Tiu2jwuGRqbaRI6XU6lchV bpDSzRwHuhgs/F6EhQKxlhsCD3IBnhMXZ/BYMg76PACOrSlQ/EGQhCc/sSPAWXGd yMtA7/1J5+8JzQbsgeEXo5R9gPko4yIQ1vSdNiaznGqZfYWNizDZYGpVpNnLQBgj CD7tAUifPjQb9VQr8y/1VYRlUPAJvYFx0t5AxJvZjx9gIhqgbmDis2zo1Zlqc6aI aCy+NOTgF2Xeh4AxBQsJwYCKG0QN/dA0LlUubLbHY02nOzSqgr8MMJQ3zWgwSCHv DbkscHM7dLSQpVu82uUqb6mb7WBSfA56yM+rlVtTu43vJwCHqQFGj2xGYAZ9edK/ yFVekErR3NNKlHwP0+Dj =gL6S -----END PGP SIGNATURE----- --s7CsBtDqQs5UqHUm--