Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fvkpZ-0001bs-Nv for pgsql-hackers@arkaria.postgresql.org; Fri, 31 Aug 2018 14:55:25 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fvkpY-0002BZ-35 for pgsql-hackers@arkaria.postgresql.org; Fri, 31 Aug 2018 14:55:24 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fvkpX-0002AX-Pc for pgsql-hackers@lists.postgresql.org; Fri, 31 Aug 2018 14:55:23 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fvkpV-0004au-Ca for pgsql-hackers@postgresql.org; Fri, 31 Aug 2018 14:55:22 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id w7VEt6uV028227; Fri, 31 Aug 2018 10:55:07 -0400 From: Tom Lane To: Michael Paquier cc: Fabien COELHO , Michael Banck , pgsql-hackers Subject: Re: pg_verify_checksums and -fno-strict-aliasing In-reply-to: <20180831000600.GI15446@paquier.xyz> References: <1535618100.1286.3.camel@credativ.de> <7321.1535639966@sss.pgh.pa.us> <20180830175652.GC15446@paquier.xyz> <12123.1535672257@sss.pgh.pa.us> <20180831000600.GI15446@paquier.xyz> Comments: In-reply-to Michael Paquier message dated "Thu, 30 Aug 2018 17:06:00 -0700" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <28225.1535727306.1@sss.pgh.pa.us> Date: Fri, 31 Aug 2018 10:55:06 -0400 Message-ID: <28226.1535727306@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Michael Paquier writes: > On Thu, Aug 30, 2018 at 07:37:37PM -0400, Tom Lane wrote: >> Anyway, I'll work on a patch for that, unless you were on it already? > I have begun working on that and am less than halfway through it as I > needed a fresh problem, however I am not sure I would be able to finish > it today, perhaps tomorrow... If you have time and want to press on as > 11 would release soon, of course feel free to wrap up more quickly than > I can. Some of these places might be performance-critical enough that adding a palloc/pfree cycle would not be nice. What I was considering doing was inventing something like typedef union PGAlignedBuffer { char data[BLCKSZ]; double force_align; } PGAlignedBuffer; and replacing plain char[] variables with that as appropriate. We might need one for XLOG_BLCKSZ too. Since this'd be used in frontend as well as backend, it'd likely have to end up in c.h, which is slightly annoying but not really a big deal as long as we pick a nonconflicting type name. regards, tom lane