From: Tom Lane <tgl@sss.pgh.pa.us>
To: Michael Paquier <michael@paquier.xyz>
Cc: Fabien COELHO <coelho@cri.ensmp.fr>
Cc: Michael Banck <michael.banck@credativ.de>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Subject: Re: pg_verify_checksums and -fno-strict-aliasing
Date: Fri, 31 Aug 2018 19:59:58 -0400
Message-ID: <15258.1535759998@sss.pgh.pa.us> (raw)
In-Reply-To: <20180831222119.GD5305@paquier.xyz>
References: <1535618100.1286.3.camel@credativ.de>
<alpine.DEB.2.21.1808301325070.32764@lancre>
<7321.1535639966@sss.pgh.pa.us>
<20180830175652.GC15446@paquier.xyz>
<12123.1535672257@sss.pgh.pa.us>
<20180831000600.GI15446@paquier.xyz>
<28226.1535727306@sss.pgh.pa.us>
<21037.1535745351@sss.pgh.pa.us>
<20180831222119.GD5305@paquier.xyz>
Michael Paquier <michael@paquier.xyz> writes:
> On Fri, Aug 31, 2018 at 03:55:51PM -0400, Tom Lane wrote:
>> I also fixed a few places that were using the palloc solution, and
>> one that was actually doing hand-alignment of the pointer (ugh).
>> I didn't try to be thorough about getting rid of such pallocs,
>> just fix places that seemed likely to be performance-critical.
> Okay, for the memo replay_image_masked and master_image_masked
> in xlog.c could make use of the new structure. SetWALSegSize in
> pg_standby.c and WriteEmptyXLOG in pg_resetwal.c, and pg_upgrade's
> file.c could also be patched.
I intentionally didn't change replay_image_masked/master_image_masked
to use statically-allocated buffers. Since, AFAICS, those aren't
needed in most backend processes, they'd just be eating 16KB of
per-process data space to no purpose.
The others you mention could be changed, probably, but I didn't
bother as they didn't seem performance-critical.
>> +typedef union PGAlignedBuffer
> One complain I have is about the name of those structures. Perhaps
> PGAlignedBlock and PGAlignedXlogBlock make more sense?
Don't have a strong preference, anybody else have an opinion?
(I also wondered whether to use "WAL" instead of "XLog" in that
struct name, but it seems like we've mostly stuck with "xlog"
in internal C names.)
regards, tom lane
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-hackers@postgresql.org
Cc: tgl@sss.pgh.pa.us, michael@paquier.xyz, coelho@cri.ensmp.fr, michael.banck@credativ.de
Subject: Re: pg_verify_checksums and -fno-strict-aliasing
In-Reply-To: <15258.1535759998@sss.pgh.pa.us>
* 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