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 1nyxIo-0004Ba-H1 for pgsql-bugs@arkaria.postgresql.org; Wed, 08 Jun 2022 15:08:58 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nyxIm-0006Jd-3F for pgsql-bugs@arkaria.postgresql.org; Wed, 08 Jun 2022 15:08:56 +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 1nyxIk-0006JU-W7 for pgsql-bugs@lists.postgresql.org; Wed, 08 Jun 2022 15:08:55 +0000 Received: from wout3-smtp.messagingengine.com ([64.147.123.19]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nyxIi-0005yd-5C for pgsql-bugs@postgresql.org; Wed, 08 Jun 2022 15:08:53 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.west.internal (Postfix) with ESMTP id 2391B32009F0; Wed, 8 Jun 2022 11:08:50 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Wed, 08 Jun 2022 11:08:50 -0400 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=fm2; t=1654700929; x=1654787329; bh=H MAjzOJ7coBC9dKA1ELaWTCNWGa2lQdWzIyG8OR75vg=; b=fDohrbPZMQVp2/Vzq jRdxfF56bouB9boXt8p26czmcfms6FGfGQoQJ3rrZSODAOBtelMtNBaKKtDE0GR9 xwnYCI0dxs0QSvyCKUPDlhAupM7H4VVzqHGKepsIVTRPhrqeWQTcgYI8Y0jjEd2F U2APTmTMoN4v27Bmpt8gzLPkbQMCbYaEMNgTHXipdSFtIhjy2xvU/xeCDZVb1fs4 FvZhRhmXo1wKB3gYeso+NMJxT48VnmQFr89PbkuEADm5exDPiu4ryfPdmFXGNPSD Mb/72/Mn6XnMalbPjTd6sm6MdkellxDVocQNmaPeomADibGYOa7hgCbUMkLFjEt6 je1zg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedruddtjedgkeefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvfevuffkgggtugfgjgesthekredttddtjeenucfhrhhomheptehlvhgr rhhoucfjvghrrhgvrhgruceorghlvhhhvghrrhgvsegrlhhvhhdrnhhoqdhiphdrohhrgh eqnecuggftrfgrthhtvghrnhepvdektdffudfftdffffehfffhjeejhffgieeuueekjeek fffgudffhfduffffueevnecuffhomhgrihhnpegvnhhtvghrphhrihhsvggusgdrtghomh enucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrlhhv hhgvrhhrvgesrghlvhhhrdhnohdqihhprdhorhhg X-ME-Proxy: Feedback-ID: ia2694551:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 8 Jun 2022 11:08:49 -0400 (EDT) Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id 1E56C2A4CF9; Wed, 8 Jun 2022 17:08:47 +0200 (CEST) Date: Wed, 8 Jun 2022 17:08:47 +0200 From: Alvaro Herrera To: Daniele Varrazzo Cc: pgsql-bugs Subject: Re: Using PQexecQuery in pipeline mode produces unexpected Close messages Message-ID: <202206081508.pwq4ne3df2si@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2022-Jun-08, Daniele Varrazzo wrote: > Is this a problem with PQexecQuery which should not send the Close, or > with receiving in IDLE mode which should expect a CloseComplete? Interesting. What that Close message is doing is closing the unnamed portal, which is otherwise closed implicitly when the next one is opened. That's how single-query mode works: if you run a single portal, it'll be kept open. I believe that the right fix is to not send that Close message in PQsendQuery. -- Álvaro Herrera 48°01'N 7°57'E — https://www.EnterpriseDB.com/ "Para tener más hay que desear menos"