pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Stephen Frost <sfrost@snowman.net>
To: Jan Wieck <jan@wi3ck.info>
Cc: Alban Hertroys <haramrae@gmail.com>
Cc: Edson Carlos Ericksson Richter <richter@simkorp.com.br>
Cc: pgsql-general@lists.postgresql.org
Subject: Re: Does PostgreSQL check database integrity at startup?
Date: Sun, 31 Dec 2017 11:33:40 -0500
Message-ID: <20171231163340.GO2416@tamriel.snowman.net> (raw)
In-Reply-To: <CAGBW59fBrhado-6NbtT1LES9cTR2PM3syCTsmCF=svxeh4THJw@mail.gmail.com>
References: <42cda197-fead-a7e5-a7e2-750d98bc4eb2@simkorp.com.br>
	<743808611.5608368.1514484408822@mail.yahoo.com>
	<20171228182636.GG4628@tamriel.snowman.net>
	<CAGBW59fasv0KxRg6YTfQM7+zzmJ6jnwBvDGEiNi0aJH9HyqCzA@mail.gmail.com>
	<48a4bcfa-6b85-81ca-9b59-9e47af8fa5af@simkorp.com.br>
	<20171230011315.GC2416@tamriel.snowman.net>
	<CAGBW59eqjmsymYJUFO6q0Yya3G2AonSi-h0vUiUCYKYUsLLM_w@mail.gmail.com>
	<1B534695-9219-4555-B31E-92A73D390621@gmail.com>
	<20171230152716.GH2416@tamriel.snowman.net>
	<CAGBW59fBrhado-6NbtT1LES9cTR2PM3syCTsmCF=svxeh4THJw@mail.gmail.com>

Jan, all,

* Jan Wieck (jan@wi3ck.info) wrote:
> On Sat, Dec 30, 2017 at 10:27 AM, Stephen Frost <sfrost@snowman.net> wrote:
> > The checksums included in PG are page-level and therefore there simply
> > isn't one to look at if the file is zero bytes.
> 
> 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

Attachments:

  signature.asc (application/pgp-signature, 818B) download

view thread (51+ messages)

Message-ID: <20171231163340.GO2416@tamriel.snowman.net>
Permalink:  ../20171231163340.GO2416@tamriel.snowman.net/
Also on:    postgresql.org/message-id/20171231163340.GO2416@tamriel.snowman.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: sfrost@snowman.net, jan@wi3ck.info, haramrae@gmail.com, richter@simkorp.com.br
  Subject: Re: Does PostgreSQL check database integrity at startup?
  In-Reply-To: <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> <CAGBW59fasv0KxRg6YTfQM7+zzmJ6jnwBvDGEiNi0aJH9HyqCzA@mail.gmail.com> <48a4bcfa-6b85-81ca-9b59-9e47af8fa5af@simkorp.com.br> <20171230011315.GC2416@tamriel.snowman.net> <CAGBW59eqjmsymYJUFO6q0Yya3G2AonSi-h0vUiUCYKYUsLLM_w@mail.gmail.com> <1B534695-9219-4555-B31E-92A73D390621@gmail.com> <20171230152716.GH2416@tamriel.snowman.net> <CAGBW59fBrhado-6NbtT1LES9cTR2PM3syCTsmCF=svxeh4THJw@mail.gmail.com> <20171231163340.GO2416@tamriel.snowman.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox