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 1gCQ9S-0003a1-3Y for pgsql-hackers@arkaria.postgresql.org; Tue, 16 Oct 2018 14:16:50 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gCQ9P-0007z1-I4 for pgsql-hackers@arkaria.postgresql.org; Tue, 16 Oct 2018 14:16:47 +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 1gCQ9P-0007yu-7V for pgsql-hackers@lists.postgresql.org; Tue, 16 Oct 2018 14:16:47 +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 1gCQ9I-0004LY-OE for pgsql-hackers@postgresql.org; Tue, 16 Oct 2018 14:16:46 +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 w9GEGXfV030246; Tue, 16 Oct 2018 10:16:34 -0400 From: Tom Lane To: Andres Freund cc: pgsql-hackers@postgresql.org, Thomas Munro Subject: Re: Large writable variables In-reply-to: <20181016063317.xjfd2dnlhy6tg5gx@alap3.anarazel.de> References: <20181015200754.7y7zfuzsoux2c4ya@alap3.anarazel.de> <31562.1539658872@sss.pgh.pa.us> <6813.1539669540@sss.pgh.pa.us> <20181016063317.xjfd2dnlhy6tg5gx@alap3.anarazel.de> Comments: In-reply-to Andres Freund message dated "Mon, 15 Oct 2018 23:33:17 -0700" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <30244.1539699393.1@sss.pgh.pa.us> Date: Tue, 16 Oct 2018 10:16:33 -0400 Message-ID: <30245.1539699393@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Andres Freund writes: > On 2018-10-16 01:59:00 -0400, Tom Lane wrote: >> Also, I noticed that the biggest part of those structs are arrays of >> FormatNode, which has been designed with complete lack of thought about >> size or padding issues. We can very easily cut it in half on 64-bit >> machines. > Heh, neat. I feel like we've paid very little attention to that in a > myriad of places :( Most of the time, we probably *shouldn't* pay attention to it; logical field ordering is worth a good deal IMO. But in a case like this, where there are large arrays of the things and it's not very painful to avoid padding waste, it's worth the trouble. regards, tom lane