Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hZH05-0007YZ-Sv for pgsql-general@arkaria.postgresql.org; Fri, 07 Jun 2019 15:41:54 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hZH04-00084K-M6 for pgsql-general@arkaria.postgresql.org; Fri, 07 Jun 2019 15:41:52 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hZH04-000849-8i for pgsql-general@lists.postgresql.org; Fri, 07 Jun 2019 15:41:52 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hZGzx-0003F9-Px for pgsql-general@lists.postgresql.org; Fri, 07 Jun 2019 15:41:51 +0000 Received: from pro.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id x57FfaaR002996; Fri, 7 Jun 2019 11:41:36 -0400 From: Tom Lane To: Adrian Klaver cc: Karsten Hilbert , pgsql-general Subject: Re: pg_dump include/exclude data, was: verify checksums / CREATE DATABASE In-reply-to: <65d1d891-5063-2094-9e3b-7b0e2926f82c@aklaver.com> References: <20190605144737.GC16572@hermes.hilbert.loc> <20190606135037.GJ1767@hermes.hilbert.loc> <65d1d891-5063-2094-9e3b-7b0e2926f82c@aklaver.com> Comments: In-reply-to Adrian Klaver message dated "Fri, 07 Jun 2019 08:02:32 -0700" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <6613.1559922096.1@sss.pgh.pa.us> Date: Fri, 07 Jun 2019 11:41:36 -0400 Message-ID: <6614.1559922096@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk 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