pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Karsten Hilbert <Karsten.Hilbert@gmx.net>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Adrian Klaver <adrian.klaver@aklaver.com>
Cc: pgsql-general <pgsql-general@lists.postgresql.org>
Subject: Re: pg_dump include/exclude data, was: verify checksums / CREATE DATABASE
Date: Tue, 11 Jun 2019 09:27:14 +0200
Message-ID: <20190611072714.GC2660@hermes.hilbert.loc> (raw)
In-Reply-To: <6614.1559922096@sss.pgh.pa.us>
References: <20190605144737.GC16572@hermes.hilbert.loc>
	<CABUevEw8c+5nW0mgFBjhbvefzyxFnFL77BrjTZMRQqRQ1pWBHg@mail.gmail.com>
	<20190606135037.GJ1767@hermes.hilbert.loc>
	<65d1d891-5063-2094-9e3b-7b0e2926f82c@aklaver.com>
	<6614.1559922096@sss.pgh.pa.us>

Dear Tom,

On Fri, Jun 07, 2019 at 11:41:36AM -0400, Tom Lane wrote:

> On 6/6/19 6:50 AM, Karsten Hilbert wrote:
> >> The current canonical solution (?) for verifying checksums in
> >> an existing database is, to may understanding, to pg_dump it
> >> (to /dev/null, perhaps):
> >> as that will read and verify all blocks related to the dump
> >> of that database.
>
> FWIW, that doesn't seem especially canonical from here.  In particular,
> pg_dump will not normally result in any examination at all of indexes
> on user-defined tables --- it'll just be doing seqscans of the tables
> proper.  You could hope for reasonably complete coverage of the system
> catalogs along with user tables, but missing out user indexes seems
> like a pretty big gap.

I agree it would, but not in the case I hope to protect:
Within the database upgrade process, after cloning the
database via "CREATE DATABASE ... TEMPLATE ...", all indexes
are REINDEXed inside the new database. That would take care
of corrupted data having been carried over within index
related disk blocks, I would think.

> The actual solution for this as of v11 is pg_verify_checksums
> (renamed to just pg_checksums for v12).

Sure but that is not (yet) possible against a cluster that's online.

Thanks,
Karsten
--
GPG  40BE 5B0E C98E 1713 AFA6  5BC0 3BEA AC80 7D4F C89B





view thread (6+ messages)  latest in thread

Message-ID: <20190611072714.GC2660@hermes.hilbert.loc>
Permalink:  ../20190611072714.GC2660@hermes.hilbert.loc/
Also on:    postgresql.org/message-id/20190611072714.GC2660@hermes.hilbert.loc

 · 

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: Karsten.Hilbert@gmx.net, tgl@sss.pgh.pa.us, adrian.klaver@aklaver.com
  Subject: Re: pg_dump include/exclude data, was: verify checksums / CREATE DATABASE
  In-Reply-To: <20190611072714.GC2660@hermes.hilbert.loc>
  References: <20190605144737.GC16572@hermes.hilbert.loc> <CABUevEw8c+5nW0mgFBjhbvefzyxFnFL77BrjTZMRQqRQ1pWBHg@mail.gmail.com> <20190606135037.GJ1767@hermes.hilbert.loc> <65d1d891-5063-2094-9e3b-7b0e2926f82c@aklaver.com> <6614.1559922096@sss.pgh.pa.us> <20190611072714.GC2660@hermes.hilbert.loc>

* 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