Re: pg_dump include/exclude data, was: verify checksums / CREATE DATABASE

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
Cc: Karsten Hilbert <Karsten(dot)Hilbert(at)gmx(dot)net>, pgsql-general <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: pg_dump include/exclude data, was: verify checksums / CREATE DATABASE
Date: 2019-06-07 15:41:36
Message-ID: 6614.1559922096@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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.

The actual solution for this as of v11 is pg_verify_checksums
(renamed to just pg_checksums for v12). I don't think there's
any really convincing answer before v11.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Peter Geoghegan 2019-06-07 15:58:25 Re: Table partition with primary key in 11.3
Previous Message Adrian Klaver 2019-06-07 15:02:32 Re: pg_dump include/exclude data, was: verify checksums / CREATE DATABASE