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 1pUVZe-0002DN-Sy for pgsql-hackers@arkaria.postgresql.org; Tue, 21 Feb 2023 16:33:03 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pUVZd-0004kr-MI for pgsql-hackers@arkaria.postgresql.org; Tue, 21 Feb 2023 16:33:01 +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 1pUVZc-0004kI-SA for pgsql-hackers@lists.postgresql.org; Tue, 21 Feb 2023 16:33:01 +0000 Received: from wout4-smtp.messagingengine.com ([64.147.123.20]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pUVZZ-0003bU-BH for pgsql-hackers@postgresql.org; Tue, 21 Feb 2023 16:33:00 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id AFAF53200035; Tue, 21 Feb 2023 11:32:53 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Tue, 21 Feb 2023 11:32:54 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:reply-to:sender :subject:subject:to:to:x-me-proxy:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm1; t=1676997173; x=1677083573; bh=d 7hOPsAimmlN3NLJ/TBMHF66NXPicPzZvrDt2rNuAuM=; b=h8bxIAncICoUa+WYc KUwdcR5Q55qncBPQ9CuTbd/SJznmRNTi+tlSdM5lPQ8OyaBGVU+ctT+3khk5UPZW OZvUrXOwPpshmYAS45bxk1Ac76JdmItFYxOciQUyFSDFZyDw7/arzxh0Bl6PrvJK irKG0J55y4L2XFKGsjOyqRgY3dMl5CJzM1fNTi8fPCOae9KJbYBv172OQ0RsZOf3 0bp/e6tC/hs7iDXQFk7Yxl1V6DF0wjfMyDt3UQkhL/6F3zA8vRfZQe7NY8paSFce Z0s5OdcNjujq0bNPqHBMiAwOYH8IiUAG7TifDyqbopnIbqVoiwz910qrQ87Rs4/p yJOBQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrudejjedgkeekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvfevuffkgggtugfgjgesthekredttddtjeenucfhrhhomheptehlvhgr rhhoucfjvghrrhgvrhgruceorghlvhhhvghrrhgvsegrlhhvhhdrnhhoqdhiphdrohhrgh eqnecuggftrfgrthhtvghrnhephfeuheeuuefgffelhefhhfeltdeuvefhvdejvdekleet ledttdegtdevtdevkeeknecuffhomhgrihhnpegvnhhtvghrphhrihhsvggusgdrtghomh dplhifnhdrnhgvthenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhl fhhrohhmpegrlhhvhhgvrhhrvgesrghlvhhhrdhnohdqihhprdhorhhg X-ME-Proxy: Feedback-ID: ia2694551:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 21 Feb 2023 11:32:52 -0500 (EST) Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id 2E9CA9C; Tue, 21 Feb 2023 17:32:49 +0100 (CET) Date: Tue, 21 Feb 2023 17:32:49 +0100 From: Alvaro Herrera To: Andres Freund Cc: Yugo NAGATA , Tom Lane , Fabien COELHO , pgsql-hackers@postgresql.org Subject: Re: pgbench: using prepared BEGIN statement in a pipeline could cause an error Message-ID: <20230221163249.orhvsut5re55fcn3@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20230220201747.4fblwswxq3xbgz2c@alvherre.pgsql> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2023-Feb-20, Alvaro Herrera wrote: > Found one last problem: if you do "-f foobar.sql -M prepared" in that > order, then the prepare fails because the statement names would not be > assigned when the file is parsed. This coding only supported doing > "-M prepared -f foobar.sql", which funnily enough is the only one that > PostgreSQL/Cluster.pm->pgbench() supports. So I moved the prepared > statement name generation to the postprocess step. Pushed to all three branches -- thanks, Nagata-san, for diagnosing the issue. -- Álvaro Herrera PostgreSQL Developer — https://www.EnterpriseDB.com/ "How strange it is to find the words "Perl" and "saner" in such close proximity, with no apparent sense of irony. I doubt that Larry himself could have managed it." (ncm, http://lwn.net/Articles/174769/)