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 1pP3Kr-0007Se-63 for pgsql-hackers@arkaria.postgresql.org; Mon, 06 Feb 2023 15:23:13 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pP3Kq-00089X-2i for pgsql-hackers@arkaria.postgresql.org; Mon, 06 Feb 2023 15:23:12 +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 1pP3Kp-00089O-Q8 for pgsql-hackers@lists.postgresql.org; Mon, 06 Feb 2023 15:23:11 +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 1pP3Kn-00077V-Ly for pgsql-hackers@postgresql.org; Mon, 06 Feb 2023 15:23:10 +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 316FN1RH2663735; Mon, 6 Feb 2023 10:23:01 -0500 From: Tom Lane To: Alvaro Herrera cc: Yugo NAGATA , Fabien COELHO , pgsql-hackers@postgresql.org Subject: Re: pgbench: using prepared BEGIN statement in a pipeline could cause an error In-reply-to: <20230206101132.3oge5d5ovoirvxhb@alvherre.pgsql> References: <20230206101132.3oge5d5ovoirvxhb@alvherre.pgsql> Comments: In-reply-to Alvaro Herrera message dated "Mon, 06 Feb 2023 11:11:32 +0100" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2663732.1675696981.1@sss.pgh.pa.us> Date: Mon, 06 Feb 2023 10:23:01 -0500 Message-ID: <2663733.1675696981@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Alvaro Herrera writes: > I'm writing my own patch for this problem. While playing around with > it, I noticed this: > struct Command { > /* size: 2168, cachelines: 34, members: 11 */ > /* sum members: 2164, holes: 1, sum holes: 4 */ > /* last cacheline: 56 bytes */ > }; I think the original intent was for argv[] to be at the end, which fell victim to ye olde add-at-the-end antipattern. Cache-friendliness-wise, putting it back to the end would likely be enough. But turning it into a variable-size array would be better from a functionality standpoint. regards, tom lane