Re: [patch] Fix checksum verification in base backups for zero page headers

From: Anastasia Lubennikova <a(dot)lubennikova(at)postgrespro(dot)ru>
To: Michael Banck <michael(dot)banck(at)credativ(dot)de>
Cc: PostgreSQL Development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [patch] Fix checksum verification in base backups for zero page headers
Date: 2020-09-24 14:24:27
Message-ID: 9489c221-e2ef-e7ad-d921-5ccad71b14de@postgrespro.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


On 22.09.2020 17:30, Michael Banck wrote:
> Hi,
>
> Am Dienstag, den 22.09.2020, 16:26 +0200 schrieb Michael Banck:
>> Am Mittwoch, den 02.09.2020, 16:50 +0300 schrieb Anastasia Lubennikova:
>>> I've looked through the previous discussion. As far as I got it, most of
>>> the controversy was about online checksums improvements.
>>>
>>> The warning about pd_upper inconsistency that you've added is a good
>>> addition. The patch is a bit messy, though, because a huge code block
>>> was shifted.
>>>
>>> Will it be different, if you just leave
>>> "if (!PageIsNew(page) && PageGetLSN(page) < startptr)"
>>> block as it was, and add
>>> "else if (PageIsNew(page) && !PageIsZero(page))" ?
>> Thanks, that does indeed look better as a patch and I think it's fine
>> as-is for the code as well, I've attached a v2.
> Sorry, forgot to add you as reviewer in the proposed commit message,
> I've fixed that up now in V3.
>
>
> Michael
>
Great. This version looks good to me.
Thank you for answering my questions, I agree, that we can work on them
in separate threads.

So I mark this one as ReadyForCommitter.

The only minor problem is a typo (?) in the proposed commit message.
"If a page is all zero, consider that a checksum failure." It should be
"If a page is NOT all zero...".

--
Anastasia Lubennikova
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Heikki Linnakangas 2020-09-24 14:54:11 Re: Refactor pg_rewind code and make it work against a standby
Previous Message Daniel Gustafsson 2020-09-24 14:21:24 Re: scram-sha-256 broken with FIPS and OpenSSL 1.0.2