Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eVgYU-0002dn-OE for pgsql-general@arkaria.postgresql.org; Sun, 31 Dec 2017 16:33:46 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eVgYU-0005n5-BF for pgsql-general@arkaria.postgresql.org; Sun, 31 Dec 2017 16:33: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_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1eVgYU-0005mv-4H for pgsql-general@lists.postgresql.org; Sun, 31 Dec 2017 16:33:46 +0000 Received: from tamriel.snowman.net ([2001:470:e38f::11]) by magus.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1eVgYQ-0001H3-Qx for pgsql-general@lists.postgresql.org; Sun, 31 Dec 2017 16:33:45 +0000 Received: by tamriel.snowman.net (Postfix, from userid 1000) id A90555F79C; Sun, 31 Dec 2017 11:33:40 -0500 (EST) Date: Sun, 31 Dec 2017 11:33:40 -0500 From: Stephen Frost To: Jan Wieck Cc: Alban Hertroys , Edson Carlos Ericksson Richter , pgsql-general@lists.postgresql.org Subject: Re: Does PostgreSQL check database integrity at startup? Message-ID: <20171231163340.GO2416@tamriel.snowman.net> References: <42cda197-fead-a7e5-a7e2-750d98bc4eb2@simkorp.com.br> <743808611.5608368.1514484408822@mail.yahoo.com> <20171228182636.GG4628@tamriel.snowman.net> <48a4bcfa-6b85-81ca-9b59-9e47af8fa5af@simkorp.com.br> <20171230011315.GC2416@tamriel.snowman.net> <1B534695-9219-4555-B31E-92A73D390621@gmail.com> <20171230152716.GH2416@tamriel.snowman.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="IpgPcFyQO6wM49Um" 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 --IpgPcFyQO6wM49Um Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Jan, all, * Jan Wieck (jan@wi3ck.info) wrote: > On Sat, Dec 30, 2017 at 10:27 AM, Stephen Frost wrot= e: > > The checksums included in PG are page-level and therefore there simply > > isn't one to look at if the file is zero bytes. >=20 > And even if the file wasn't zero bytes you can't tell from the per page > CRCs if you have all the pages you should have. You could have extra pages > that aren't supposed to be there or missing some (or any mix of the two). > A per page CRC is useless for those cases. Right, which is why it makes sense to have whole-file checksums when doing things like backups, when you're already reading all of the file and can grab a checksum in stream, to detect if anything bad happens after the backup has compeleted to the file that's been backed up. It's unclear if that would have helped here or not since we don't know when the file ended up being zero'd out, as I understand it. Thanks! Stephen --IpgPcFyQO6wM49Um Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBCgAGBQJaSRFkAAoJEO1sijiDR2RVp54P/R3y6RuG2B8Kx6EY8vz8PvXh /K5yy6fZxAVgRMupkEsCUDbpyLTCkLb0MA3lfo4Zyt6ZXFxotQUl6u3H40GDWkoe cfgA6NerdYiOVpqR4ghUjwV4sO5E2EVN6o6EwWv7Py3eSDY+65MzqTSdwEecNVSs rAZcQD7SXugS4G/hTIqD/3AxeO+iiIxANo0P1jJVRlZHg7FKZkG2+fYgw2kIgO4c rQy+AXGX57cEC0CFrmasmZyi0sRaah9bIoK4Tx+LShyGjl4lMOCxGAMdDYoG1ADw bEY5BkEfGrXxQ8svOAyMHsdDgBBOg5MW+XBqpLaF1yXztguPSC7oBVhCKdYYoUBy xqUUSTFxyPNIfhBHVyAlHD7uhARf74jjRl86E5fAWH4US4ivWmblip42FuUWyfjG ScRwqjB1UtqEjlnHyq1IzkDHRCBrSSMec4R+kLUrcE/VlQS3DcpaNLf3lqhHuZf+ yi8HSWlfIkChRarzcijsC53NoxW1HzKq7ygpfsim9B1aBpZGinesftam7y5e5l37 4FqaH4hwxZgW8KfXWZcdb55aCyhDVGoJC3QbQXcZLOkBnIPe9vEM+JTpOlwpPiLu HaqhKMeVozgsPnV7KXxNX/GgTowlP0DnGJq+hjNOKXY6m/RChwuMBoW53SWGfyD9 yRW4Dv7OCaNFR51kcir9 =U8ZZ -----END PGP SIGNATURE----- --IpgPcFyQO6wM49Um--