Re: pgsql: Validate page level checksums in base backups

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Magnus Hagander <magnus(at)hagander(dot)net>
Cc: Andres Freund <andres(at)anarazel(dot)de>, Michael Banck <michael(dot)banck(at)credativ(dot)de>, David Steele <david(at)pgmasters(dot)net>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: Re: pgsql: Validate page level checksums in base backups
Date: 2018-04-03 18:55:07
Message-ID: 23574.1522781707@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

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

In response to

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2018-04-03 20:26:13 pgsql: Prevent accidental linking of system-supplied copies of libpq.so
Previous Message Magnus Hagander 2018-04-03 18:48:08 Re: pgsql: Validate page level checksums in base backups

Browse pgsql-hackers by date

  From Date Subject
Next Message Daniel Gustafsson 2018-04-03 18:56:12 Re: Optimize Arm64 crc32c implementation in Postgresql
Previous Message Magnus Hagander 2018-04-03 18:48:08 Re: pgsql: Validate page level checksums in base backups