pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Karsten Hilbert <Karsten.Hilbert@gmx.net>
To: pgsql-general <pgsql-general@lists.postgresql.org>
Subject: pg_dump include/exclude data, was: verify checksums / CREATE DATABASE
Date: Thu, 6 Jun 2019 15:50:37 +0200
Message-ID: <20190606135037.GJ1767@hermes.hilbert.loc> (raw)
In-Reply-To: <CABUevEw8c+5nW0mgFBjhbvefzyxFnFL77BrjTZMRQqRQ1pWBHg@mail.gmail.com>
References: <20190605144737.GC16572@hermes.hilbert.loc>
	<CABUevEw8c+5nW0mgFBjhbvefzyxFnFL77BrjTZMRQqRQ1pWBHg@mail.gmail.com>

Now that it is established that CREATE DATABASE does not
verify checksums on the template I have a followup question.

The current canonical solution (?) for verifying checksums in
an existing database is, to may understanding, to pg_dump it
(to /dev/null, perhaps):

	pg_dump --username=... --dbname=... --compress=0 --no-sync --format=custom --file=/dev/null

as that will read and verify all blocks related to the dump
of that database.

One will be tempted to include options to speed up the
process, say:

	 --data-only

which would not output schema definitions. I wonder, however,
whether doing so would allow pg_dump to skip some reads into
the catalog tables, thereby, perhaps not detecting some
corruption in those ?

This question would apply to the following list of options as
far as I can see:

	#--no-acl
	#--no-comments
	#--no-publications
	#--no-subscriptions
	#--no-security-label

Is my assumption wrong ?

I don't really expect to just be handed a full answer (unless
someone easily knows offhand) - however, I don't really know
where to look for it. Pointers would be helpful.

Is the only way to know reading the source or suitable
server logs and compare queries between runs with/without
said options ?

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





view thread (6+ messages)  latest in thread

Message-ID: <20190606135037.GJ1767@hermes.hilbert.loc>
Permalink:  ../20190606135037.GJ1767@hermes.hilbert.loc/
Also on:    postgresql.org/message-id/20190606135037.GJ1767@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
  Subject: Re: pg_dump include/exclude data, was: verify checksums / CREATE DATABASE
  In-Reply-To: <20190606135037.GJ1767@hermes.hilbert.loc>
  References: <20190605144737.GC16572@hermes.hilbert.loc> <CABUevEw8c+5nW0mgFBjhbvefzyxFnFL77BrjTZMRQqRQ1pWBHg@mail.gmail.com> <20190606135037.GJ1767@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