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 1o0hxb-000846-8S for pgsql-hackers@arkaria.postgresql.org; Mon, 13 Jun 2022 11:10:19 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1o0hxZ-0007wu-8n for pgsql-hackers@arkaria.postgresql.org; Mon, 13 Jun 2022 11:10:17 +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 1o0hxY-0007wk-4X for pgsql-hackers@lists.postgresql.org; Mon, 13 Jun 2022 11:10:16 +0000 Received: from out2-smtp.messagingengine.com ([66.111.4.26]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1o0hxT-0006wC-MM for pgsql-hackers@lists.postgresql.org; Mon, 13 Jun 2022 11:10:15 +0000 Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 2300B5C0253; Mon, 13 Jun 2022 07:10:09 -0400 (EDT) Received: from imap47 ([10.202.2.97]) by compute2.internal (MEProxy); Mon, 13 Jun 2022 07:10:09 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:date:date:feedback-id :feedback-id:from:from:in-reply-to:in-reply-to:message-id :mime-version:references: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=1655118609; x=1655205009; bh=VN2IYIHk0YYq6zKpDF6+/IlWHkuZ lty2j2oVi9MlimM=; b=bq5J4Z+5CrbiIHkvMb7FluIurJ2pLdQ6xkzkcT7owQwb QN7AERGzNH3Ik8+bybLMIp29C2vawcNvDfK7xu+q7YgP33UvyL9nqYIZ2257pqgf 0HmMRvusag9B2TFv/rEEfp6Ah4VRCqs4kbKlXpRXGviNatb1VjFsUs1KVX6F600r y3yTRjdhgc2rjQhxyXoz1bs1Gx7zb8ML1ocwMoULbASmXruwHCEjHXskCwsUFZ2Q q+J+pGZYDPKldooXAmmK2IZjykTLir5Jj0T1UIRLEA0YBmr2zOtrZlO2+P0wouq2 MNsqXAmmzX8HpENT8QHK871I1So04l5sy64rqRqjhw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedruddujedgfeehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefofgggkfgjfhffhffvvefutgesrg dtreerreerjeenucfhrhhomheplmhlvhgrrhhopgfjvghrrhgvrhgruceorghlvhhhvghr rhgvsegrlhhvhhdrnhhoqdhiphdrohhrgheqnecuggftrfgrthhtvghrnhepgedtffdtle eigeffiedtiefhffegteeludfhgeffgeevudehleffvdekheegjeeinecuvehluhhsthgv rhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprghlvhhhvghrrhgvsegrlh hvhhdrnhhoqdhiphdrohhrgh X-ME-Proxy: Feedback-ID: ia2694551:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id 0827DA60076; Mon, 13 Jun 2022 07:10:08 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.7.0-alpha0-692-gb287c361f5-fm-20220603.003-gb287c361 Mime-Version: 1.0 Message-Id: In-Reply-To: <20220610.152544.1597540405935332165.horikyota.ntt@gmail.com> References: <202206081508.pwq4ne3df2si@alvherre.pgsql> <20220610.152544.1597540405935332165.horikyota.ntt@gmail.com> Date: Mon, 13 Jun 2022 13:09:48 +0200 From: =?UTF-8?Q?=C3=81lvaro_Herrera?= To: "Kyotaro Horiguchi" Cc: daniele.varrazzo@gmail.com, "pgsql-hackers@lists.postgresql.org" Subject: Re: Using PQexecQuery in pipeline mode produces unexpected Close messages Content-Type: multipart/alternative; boundary=f5f15fe2dc004050bc54073a72f0c057 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --f5f15fe2dc004050bc54073a72f0c057 Content-Type: text/plain On Fri, Jun 10, 2022, at 8:25 AM, Kyotaro Horiguchi wrote: > > The current implement of PQsendQueryInternal looks like the result of > a misunderstanding of the doc. In the regression tests, that path is > excercised only for an error case, where no CloseComplete comes. > > The attached adds a test for the normal-path of pipelined > PQsendQuery() to simple_pipeline test then modifies that function not > to send Close message. Without the fix, the test fails by "unexpected > notice" even if the trace matches the "expected" content. Hah, the patch I wrote is almost identical to yours, down to the notice processor counting the number of notices received. The only difference is that I put my test in pipeline_abort. Sadly, it looks like I won't be able to get this patched pushed for 14.4. --f5f15fe2dc004050bc54073a72f0c057 Content-Type: text/html Content-Transfer-Encoding: quoted-printable
On Fri, Jun 10,= 2022, at 8:25 AM, Kyotaro Horiguchi wrote:

The current implement of= PQsendQueryInternal looks like the result of
a misunderst= anding of the doc.  In the regression tests, that path is
=
excercised only for an error case, where no CloseComplete comes.

The attached adds a test for the normal-path = of pipelined
PQsendQuery() to simple_pipeline test then mo= difies that function not
to send Close message. Without th= e fix, the test fails by "unexpected
notice" even if the t= race matches the "expected" content.

Hah, the patch I wrote is almost identical to yours, down to= the notice processor counting the number of notices received.  The= only difference is that I put my test in pipeline_abort.
=
Sadly, it looks like I won't be able to get this patched = pushed for 14.4.


--f5f15fe2dc004050bc54073a72f0c057--