Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1f3R5R-0000XJ-SV for pgsql-committers@arkaria.postgresql.org; Tue, 03 Apr 2018 18:55:17 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1f3R5Q-00023T-NC for pgsql-committers@arkaria.postgresql.org; Tue, 03 Apr 2018 18:55:16 +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.89) (envelope-from ) id 1f3R5Q-00023H-IF for pgsql-committers@lists.postgresql.org; Tue, 03 Apr 2018 18:55:16 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1f3R5N-0006di-IA for pgsql-committers@lists.postgresql.org; Tue, 03 Apr 2018 18:55:15 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id w33It7e4023575; Tue, 3 Apr 2018 14:55:07 -0400 From: Tom Lane To: Magnus Hagander cc: Andres Freund , Michael Banck , David Steele , PostgreSQL-development , pgsql-committers@lists.postgresql.org Subject: Re: pgsql: Validate page level checksums in base backups In-reply-to: References: <20180403171356.v4ji5sfhbc4sggij@alap3.anarazel.de> <22322.1522780151@sss.pgh.pa.us> Comments: In-reply-to Magnus Hagander message dated "Tue, 03 Apr 2018 20:48:08 +0200" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <23573.1522781707.1@sss.pgh.pa.us> Date: Tue, 03 Apr 2018 14:55:07 -0400 Message-ID: <23574.1522781707@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Magnus Hagander writes: > On Tue, Apr 3, 2018 at 8:29 PM, Tom Lane wrote: >> It's scribbling on the source cluster's disk files and assuming that that >> translates one-for-one to what gets sent to the slave server --- but what >> if some of the blocks that it modifies on-disk are resident in the >> source's shared buffers? I think you'd have to shut down the source and >> then apply the corruption if you want stable results. > It doesn't actually use a slave server as part of the tests. > And basebackups don't read from the sources shared buffers, but it *does* > read from the kernel buffers. Right, so the failure case occurs when the source server writes back a dirty page from its shared buffers to disk, in between the test script's corrupting that page on-disk and then trying to read it. Again, you'd have several orders of magnitude better chance of getting reproducible behavior if you were targeting something that wasn't a system catalog. regards, tom lane