Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1likRU-0002RD-Ce for pgsql-hackers@arkaria.postgresql.org; Mon, 17 May 2021 21:06:24 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1likQx-0003tL-R7 for pgsql-hackers@arkaria.postgresql.org; Mon, 17 May 2021 21:05:51 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1likQx-0003rs-Gg for pgsql-hackers@lists.postgresql.org; Mon, 17 May 2021 21:05:51 +0000 Received: from mail-ot1-x32f.google.com ([2607:f8b0:4864:20::32f]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1likQv-0007jV-7g for pgsql-hackers@postgresql.org; Mon, 17 May 2021 21:05:51 +0000 Received: by mail-ot1-x32f.google.com with SMTP id u19-20020a0568302493b02902d61b0d29adso6770137ots.10 for ; Mon, 17 May 2021 14:05:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telsasoft-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=9ejehTp3AH68Bi6Jxo6dcNiElY4sltn7jV2+XIMdHbw=; b=WfnAYysplAZVNqympBv0ORn8h9rS7NJaoMJWz9zaFd3hVaqqRvEroDD95agjmZ04Hs HlQGAxL5hqlm9cJ/ZRMK6cp7uBDtaZnudX01RRTvw2PkPkIHTCqV366gI421X+H7bXhy LjiBf1JTV/4fiXq32MGujd5wwJ2TTTlgicyRjrHHZGl8z7VYdNjZspIMRm6BX9Piotsp 4PMxPVv7AU+ku64FIj3w97YGdXoeWhm3Rs6qobytmJCWyMWAHpW5URhiDOclrFJx6xPg +8kNHBYmU14/GGzkiU2Ow8O2PukIQ1HwdaFOH7eo6j5AIEg9C7kzJWSDVUp5SJDaGS36 rBpA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=9ejehTp3AH68Bi6Jxo6dcNiElY4sltn7jV2+XIMdHbw=; b=DFxyTKh2zF75tkBzN6Sgm6N/NP9yxl+KQlkevEvPaXcTB/8SkFdqPXi+ndkeOs2Cl9 8m2AeR1Jm9cEK5u+5ewIUFjg86tibZux/HbUMYJ8T0SCNLWkShOHilazL92vAlxptLt5 d8P+bD2Q86vaUrMUofqI56PigUCAJ1+ZD7cSmDu+RVZWLKrtFszISmrkfk5N8AlKJ5K4 2+IIRDLHLMF87IB7b7/xh5SPkv3+zddS2jzINbCnnWgZoRueYnraJn5XxXfPSMY9vsI8 KBS4j/xcoASg32hKlaR/+H3t4qYMdBnj0NXSKWhpQzz7y4bHOg2jRD/L+9fUv8h+4t7R dC/A== X-Gm-Message-State: AOAM531/UeHiHV5CE1h73E5cLZbq9xMQk6Qlm6N9ivzAUFb6ZJj37FGo Pl0JGXWgMimOLJZ4x5jDkPExdQ== X-Google-Smtp-Source: ABdhPJzD0wxrNVfPezvvLv9NDamwta+m870f2Dd0jOoU+LX6hvjri617uF9AZ3TrLSeycCJSTbBjgQ== X-Received: by 2002:a9d:c24:: with SMTP id 33mr1187247otr.289.1621285547057; Mon, 17 May 2021 14:05:47 -0700 (PDT) Received: from pryzbyj.telsasoft (charmander.telsasoft.com. [50.244.222.1]) by smtp.gmail.com with ESMTPSA id d19sm3279155oop.26.2021.05.17.14.05.46 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 17 May 2021 14:05:46 -0700 (PDT) Received: by pryzbyj.telsasoft (Postfix, from userid 1000) id 0EBA0800AE6; Mon, 17 May 2021 16:05:45 -0500 (CDT) Date: Mon, 17 May 2021 16:05:44 -0500 From: Justin Pryzby To: Andres Freund Cc: pgsql-hackers@postgresql.org, Dilip Kumar , Robert Haas Subject: Re: Move pg_attribute.attcompression to earlier in struct for reduced size? Message-ID: <20210517210544.GJ373@telsasoft.com> References: <20210517204803.iyk5wwvwgtjcmc5w@alap3.anarazel.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210517204803.iyk5wwvwgtjcmc5w@alap3.anarazel.de> User-Agent: Mutt/1.9.4 (2018-02-28) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Mon, May 17, 2021 at 01:48:03PM -0700, Andres Freund wrote: > pg_attribute is one of the biggest table in a new cluster, and often the > biggest table in production clusters. Its size is also quite relevant in > memory, due to all the TupleDescs we allocate. > > I just noticed that the new attcompression increased the size not just > by 1 byte, but by 4, due to padding. While an increase from 112 to 116 > bytes isn't the end of the world, it does seem worth considering using > existing unused bytes instead? +1 FYI: attcompression was an OID until a few weeks before the feature was merged, and there were several issues related to that: aa25d1089 - fixed two issues 226e2be38 -- Justin