Re: [PATCH] Verify Checksums during Basebackups - Mailing list pgsql-hackers

From Magnus Hagander
Subject Re: [PATCH] Verify Checksums during Basebackups
Date
Msg-id CABUevEyOJbF_Mjg8de5YoD_rmSn92HZkTLHYXm=avksVAZOLcA@mail.gmail.com
Whole thread Raw
In response to Re: [PATCH] Verify Checksums during Basebackups  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
On Fri, Mar 2, 2018 at 7:04 PM, Robert Haas <robertmhaas@gmail.com> wrote:
On Fri, Mar 2, 2018 at 6:23 AM, Magnus Hagander <magnus@hagander.net> wrote:
> Another quick note -- we need to assert that the size of the buffer is
> actually divisible by BLCKSZ. I don't think it's a common scenario, but it
> could break badly if somebody changes BLCKSZ. Either that or perhaps just
> change the TARSENDSIZE to be a multiple of BLCKSZ.

I think that this patch needs to support all block sizes that are
otherwise supported -- failing an assertion doesn't seem like a
reasonable option, unless it only happens for block sizes we don't
support anyway.

That's not what I meant. What I meant is to fail on an assertion if TARSENDSIZE is not evenly divisible by BLCKSZ. (Or well, maybe not an assertion, but an actual compile time error). Since BLCKSZ is changed only at compile time, we can either trap the case already at compile, or just define it away. But we should handle it.


--

pgsql-hackers by date:

Previous
From: Magnus Hagander
Date:
Subject: Re: select_parallel test failure: gather sometimes losing tuples(maybe during rescans)?
Next
From: Yura Sokolov
Date:
Subject: Re: [HACKERS] Small improvement to compactify_tuples