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

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Anastasia Lubennikova <a(dot)lubennikova(at)postgrespro(dot)ru>
Cc: Michael Banck <michael(dot)banck(at)credativ(dot)de>, PostgreSQL Development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [patch] Fix checksum verification in base backups for zero page headers
Date: 2020-10-28 07:43:44
Message-ID: 20201028074344.GL28445@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Oct 28, 2020 at 04:11:56PM +0900, Michael Paquier wrote:
> Thanks. The patch for v13 cannot use a macro, but one of the versions
> of upthread would do just fine. I have been wondering about using the
> new CheckBuffer() for the purpose of the retry to make it
> concurrent-safe, but by looking at the code I think that we would run
> unto problems when trying to open through smgr.c any relation file in
> global/ as these require an invalid backend ID, and a WAL sender does
> not satisfy that (see the assertion in GetRelationPath()).

Actually, scratch that.. It looks like I am wrong here. By using
smgropen() with InvalidBackendId and a RelFileNode built using the
path of the file being sent, similarly to what pg_rewind is doing in
isRelDataFile(), we should have everything that's needed. This is
too complicated for a backpatch and we should have some consolidation
with pg_rewind, so using the sleep/retry for v13 sounds like a safer
path to take in the stable branch.
--
Michael

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Langote 2020-10-28 07:46:01 Re: partition routing layering in nodeModifyTable.c
Previous Message Andrey Borodin 2020-10-28 07:34:58 Re: MultiXact\SLRU buffers configuration