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 1lpIej-0004xc-LU for pgsql-hackers@arkaria.postgresql.org; Fri, 04 Jun 2021 22:51:09 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lpIei-00078Y-Fo for pgsql-hackers@arkaria.postgresql.org; Fri, 04 Jun 2021 22:51:08 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lpIei-00074u-7o for pgsql-hackers@lists.postgresql.org; Fri, 04 Jun 2021 22:51:08 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lpIee-0002zk-9z for pgsql-hackers@postgresql.org; Fri, 04 Jun 2021 22:51:07 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 154Mp0pE449922; Fri, 4 Jun 2021 18:51:00 -0400 From: Tom Lane To: Alvaro Herrera cc: Michael Paquier , Robert Haas , Dilip Kumar , Andres Freund , pgsql-hackers Subject: Re: Move pg_attribute.attcompression to earlier in struct for reduced size? In-reply-to: <202106042242.s46x3xz5vtjw@alvherre.pgsql> References: <202106042242.s46x3xz5vtjw@alvherre.pgsql> Comments: In-reply-to Alvaro Herrera message dated "Fri, 04 Jun 2021 18:42:57 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <449920.1622847060.1@sss.pgh.pa.us> Date: Fri, 04 Jun 2021 18:51:00 -0400 Message-ID: <449921.1622847060@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Alvaro Herrera writes: > It seems to me that most of the overhead is the function call for > toast_get_compression_id(), so we should get rid of that. Nice result. I'm willing to live with 1.5% slowdown ... IME that's usually below the noise threshold anyway. > Now, while this patch does seem to work correctly, it raises a number of > weird cpluspluscheck warnings, which I think are attributable to the > new macro definitions. I didn't look into it closely, but I suppose it > should be fixable given sufficient effort: Didn't test, but the first one is certainly fixable by adding a cast, and I guess the others might be as well. regards, tom lane