From: David Steele <david@pgmasters.net>
To: Michael Banck <michael.banck@credativ.de>
To: Magnus Hagander <magnus@hagander.net>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Andres Freund <andres@anarazel.de>
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, 3 Apr 2018 17:17:18 -0400
Message-ID: <115dac54-38b8-b7f8-5953-3a4a57706790@pgmasters.net> (raw)
In-Reply-To: <20180403204815.GD20852@nighthawk.caipicrew.dd-dns.de>
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>
<20180403204815.GD20852@nighthawk.caipicrew.dd-dns.de>
On 4/3/18 4:48 PM, Michael Banck wrote:
>
> Attached is a patch which does that hopefully:
>
> 1. creates two user tables, one large enough for at least 6 blocks
> (around 360kb), the other just one block.
>
> 2. stops the cluster before scribbling over its data and starts it
> afterwards.
>
> 3. uses the blocksize (and the pager header size) to determine offsets
> for scribbling.
This patch looks reasonable to me.
> I've tested it with blocksizes 8 and 32 now, the latter should make sure
> that the first table is indeed large enough, but maybe something less
> arbitrary than "10000 integers" should be used?
It might be quicker to just stop the cluster and then write out an
arbitrary number of zero pages. Zero pages are always considered valid
so you can then corrupt whichever pages you want for testing.
--
-David
david@pgmasters.net
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-committers@postgresql.org
Cc: david@pgmasters.net, michael.banck@credativ.de, magnus@hagander.net, tgl@sss.pgh.pa.us, andres@anarazel.de, pgsql-hackers@postgresql.org, pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Validate page level checksums in base backups
In-Reply-To: <115dac54-38b8-b7f8-5953-3a4a57706790@pgmasters.net>
* 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