Re: WAL consistency check facility - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: WAL consistency check facility
Date
Msg-id CAB7nPqQAMCV4d95wfXZXvam47dZagBo0haqB3KDrshaDe408_A@mail.gmail.com
Whole thread Raw
In response to Re: WAL consistency check facility  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
On Mon, Oct 31, 2016 at 9:31 PM, Robert Haas <robertmhaas@gmail.com> wrote:
> On Fri, Oct 28, 2016 at 2:05 AM, Michael Paquier
>> - Instead of palloc'ing the old and new pages to compare, it would be
>> more performant to keep around two static buffers worth of BLCKSZ and
>> just use that. This way there is no need as well to perform any palloc
>> calls in the masking functions, limiting the risk of errors (those
>> code paths had better avoid errors IMO). It would be also less costly
>> to just pass to the masking function a pointer to a buffer of size
>> BLCKSZ and just do the masking on it.
>
> We always palloc buffers like this so that they will be aligned.  But
> we could arrange not to repeat the palloc every time (see, e.g.,
> BootstrapXLOG()).

Yeah, we could go with that and there is clearly no reason to not do so.
-- 
Michael



pgsql-hackers by date:

Previous
From: Abhijit Menon-Sen
Date:
Subject: Re: Proposal for changes to recovery.conf API
Next
From: Thomas Munro
Date:
Subject: WIP: [[Parallel] Shared] Hash