From: Michael Banck <michael.banck@credativ.de>
To: Tom Lane <tgl@sss.pgh.pa.us>
To: Andres Freund <andres@anarazel.de>
Cc: Magnus Hagander <magnus@hagander.net>
Cc: Fabien COELHO <coelho@cri.ensmp.fr>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Subject: Re: pg_verify_checksums and -fno-strict-aliasing
Date: Fri, 31 Aug 2018 10:11:07 +0200
Message-ID: <1535703067.1286.10.camel@credativ.de> (raw)
In-Reply-To: <7502.1535670135@sss.pgh.pa.us>
References: <1535618100.1286.3.camel@credativ.de>
<alpine.DEB.2.21.1808301325070.32764@lancre>
<7321.1535639966@sss.pgh.pa.us>
<CABUevEz+3g4-tKLgcjTNK7EwgHm95NSYSKTNyEjcnQEGRzie0A@mail.gmail.com>
<1535660901.1286.8.camel@credativ.de>
<25968.1535663968@sss.pgh.pa.us>
<20180830214606.xpm4bho5nmhfuzlx@alap3.anarazel.de>
<20180830220409.4zhdka6ibs66enbk@alap3.anarazel.de>
<28544.1535667100@sss.pgh.pa.us>
<20180830223315.m2lc57oay3kztjz4@alap3.anarazel.de>
<7502.1535670135@sss.pgh.pa.us>
Hi,
Am Donnerstag, den 30.08.2018, 19:02 -0400 schrieb Tom Lane:
> Andres Freund <andres@anarazel.de> writes:
> > On 2018-08-30 18:11:40 -0400, Tom Lane wrote:
> > > I suspect people will complain about the added cost of doing that.
> > I think the compiler will just optimize it away.
>
> Maybe. In any case, the attached version avoids any need for memcpy
> and is, I think, cleaner code anyhow. It fixes the problem for me
> with Fedora's gcc, though I'm not sure that it'd be enough to get rid
> of the warning Michael sees (I wonder what compiler he's using).
This fixes the bogus checksums, thanks!
I am on Debian stable, i.e. 'gcc version 6.3.0 20170516 (Debian 6.3.0-
18+deb9u1)'.
The warning shows up only if I add -Wall *and* -O2 to CFLAGS, I think I
did not mention that explictly before.
As it is in pg_verify_checksums.c I need Magnus' patch as well to make
it go away. But the warning is independent of the runtime issue so less
of an issue (but probably worth fixing).
Michael
--
Michael Banck
Projektleiter / Senior Berater
Tel.: +49 2166 9901-171
Fax: +49 2166 9901-100
Email: michael.banck@credativ.de
credativ GmbH, HRB Mönchengladbach 12080
USt-ID-Nummer: DE204566209
Trompeterallee 108, 41189 Mönchengladbach
Geschäftsführung: Dr. Michael Meskes, Jörg Folz, Sascha Heuer
Unser Umgang mit personenbezogenen Daten unterliegt
folgenden Bestimmungen: https://www.credativ.de/datenschutz
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: michael.banck@credativ.de, tgl@sss.pgh.pa.us, andres@anarazel.de, magnus@hagander.net, coelho@cri.ensmp.fr
Subject: Re: pg_verify_checksums and -fno-strict-aliasing
In-Reply-To: <1535703067.1286.10.camel@credativ.de>
* 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