Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1utonH-00ENg5-5j for pgsql-bugs@arkaria.postgresql.org; Wed, 03 Sep 2025 14:49:04 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1utonG-009pFB-CW for pgsql-bugs@arkaria.postgresql.org; Wed, 03 Sep 2025 14:49:02 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1utomd-009ndC-Ui for pgsql-bugs@lists.postgresql.org; Wed, 03 Sep 2025 14:48:24 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1utomb-000Mnh-01 for pgsql-bugs@lists.postgresql.org; Wed, 03 Sep 2025 14:48:24 +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 583EmHEI803147; Wed, 3 Sep 2025 10:48:17 -0400 From: Tom Lane To: =?utf-8?Q?=C3=81lvaro?= Herrera cc: d.kovalenko@postgrespro.ru, pgsql-bugs@lists.postgresql.org Subject: Re: BUG #18960: Mistake in test test_simple_pipeline (libpq_pipeline.c) In-reply-to: <202509031228.wuh3frddxcvl@alvherre.pgsql> References: <202509031228.wuh3frddxcvl@alvherre.pgsql> Comments: In-reply-to =?utf-8?Q?=C3=81lvaro?= Herrera message dated "Wed, 03 Sep 2025 14:28:30 +0200" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <803145.1756910897.1@sss.pgh.pa.us> Date: Wed, 03 Sep 2025 10:48:17 -0400 Message-ID: <803146.1756910897@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk =?utf-8?Q?=C3=81lvaro?= Herrera writes: > On 2025-Jun-21, Tom Lane wrote: >> Here's a shot at improving matters. I also made an effort >> at cleaning up memory leaks in libpq_pipeline.c, although >> that's surely neatnik-ism not anything meaningful. > Yeah, the code looks much better this way. I thought it was a bit odd > that a function called confirm_result_status() would actually consume > said status. Would it be better as > consume_result_status(PGconn *conn, ExecStatusType expected) > ? Hm, I chose that name by analogy to the adjacent confirm_query_canceled(), which is likewise consuming a result. I agree that "consume" is a better verb, but then let's rename confirm_query_canceled as well. > I think the patch is a clear improvement regardless. Thanks for reviewing! regards, tom lane