pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Magnus Hagander <magnus@hagander.net>
Cc: Andres Freund <andres@anarazel.de>
Cc: Michael Banck <michael.banck@credativ.de>
Cc: David Steele <david@pgmasters.net>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Cc: pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Validate page level checksums in base backups
Date: Tue, 03 Apr 2018 14:55:07 -0400
Message-ID: <23574.1522781707@sss.pgh.pa.us> (raw)
In-Reply-To: <CABUevEz0uBqg_uyfA-yFiL6Wo=kjn5kE9tEQrJ-vwWug9Vrwfw@mail.gmail.com>
References: <E1f3KUE-0003rM-6g@gemulon.postgresql.org>
	<20180403171356.v4ji5sfhbc4sggij@alap3.anarazel.de>
	<CABUevExQa00NOeZd7N7faSZOnL+gtThKSDv2d5zxAP7Cp9YtLA@mail.gmail.com>
	<22322.1522780151@sss.pgh.pa.us>
	<CABUevEz0uBqg_uyfA-yFiL6Wo=kjn5kE9tEQrJ-vwWug9Vrwfw@mail.gmail.com>

Magnus Hagander <magnus@hagander.net> writes:
> On Tue, Apr 3, 2018 at 8:29 PM, Tom Lane <tgl@sss.pgh.pa.us> 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




view thread (23+ messages)  latest in thread

Message-ID: <23574.1522781707@sss.pgh.pa.us>
Permalink:  ../23574.1522781707@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/23574.1522781707@sss.pgh.pa.us

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, magnus@hagander.net, andres@anarazel.de, michael.banck@credativ.de, david@pgmasters.net, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Validate page level checksums in base backups
  In-Reply-To: <23574.1522781707@sss.pgh.pa.us>

* 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