Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eUKjh-00072d-Je for pgsql-general@arkaria.postgresql.org; Wed, 27 Dec 2017 23:03:45 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eUKjg-0006DW-Ey for pgsql-general@arkaria.postgresql.org; Wed, 27 Dec 2017 23:03:44 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1eUKjg-0006DM-7d for pgsql-general@lists.postgresql.org; Wed, 27 Dec 2017 23:03:44 +0000 Received: from mail.thelabyrinth.net ([45.56.70.56]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1eUKjZ-00083s-5L for pgsql-general@postgresql.org; Wed, 27 Dec 2017 23:03:43 +0000 Received: from Davids-MacBook.local (c-68-33-78-249.hsd1.md.comcast.net [68.33.78.249]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: dsteele) by mail.thelabyrinth.net (Postfix) with ESMTPSA id 824EA54669; Wed, 27 Dec 2017 23:03:34 +0000 (UTC) Subject: Re: Does PostgreSQL check database integrity at startup? To: Alvaro Herrera Cc: Pavel Stehule , Edson Carlos Ericksson Richter , Martin Marques , "pgsql-general@postgresql.org" References: <20171226215847.7elei2bexrfin2rs@alvherre.pgsql> From: David Steele Message-ID: <0088da88-7249-7292-e922-e0fb6712c535@pgmasters.net> Date: Wed, 27 Dec 2017 18:03:31 -0500 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: <20171226215847.7elei2bexrfin2rs@alvherre.pgsql> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 12/26/17 4:58 PM, Alvaro Herrera wrote: > >> pgBackRest will validate all page checksums (including indexes, etc.) in the >> cluster during backup. Full backups check everything, incr/differential >> backups check only the files that have changed. > > If a table or index file is of zero length when backed up, as in the > described case, nothing will be checked, right? I mean, there is > nothing externally indicating that the file ought to be of a different > size. Am I wrong? Yes - that is how it works. > So Edson's situation here would not raise any red > flags. It wasn't clear to me from the OP that the primary and standby were different - I thought there was just a zero file in general. In any case, my reply was more directed at Pavel's reply about using pg_dump to validate checksums. There are better ways... -- -David david@pgmasters.net