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 1nmyKu-0005kE-TC for pgsql-hackers@arkaria.postgresql.org; Fri, 06 May 2022 13:49:36 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nmyKt-0006ih-2V for pgsql-hackers@arkaria.postgresql.org; Fri, 06 May 2022 13:49:35 +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 1nmyKs-0006iX-Gt for pgsql-hackers@lists.postgresql.org; Fri, 06 May 2022 13:49:34 +0000 Received: from out3-smtp.messagingengine.com ([66.111.4.27]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nmyKp-0001yX-9T for pgsql-hackers@postgresql.org; Fri, 06 May 2022 13:49:32 +0000 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id 852B55C0181; Fri, 6 May 2022 09:49:30 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Fri, 06 May 2022 09:49:30 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date: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=fm1; t=1651844970; x=1651931370; bh=upOYmoBokXVIJ RgUbwHt4KXvRmA3NNE2ZkaDooHBKjw=; b=hNscOAASGj3yMSFNOj7SO+yTByezb 5fG1R0M1Z8p7vA89VI+GiygiGTCRstZR7WDlD0N95BiAN97rNzqcXMWiAPAYnm1O c2+lYK0mk0ilJuCkaA9rsCTK3pQkGo3GLT6+xKz7+JYlDQmIi9O9sd9zE+1L1pdW Npqna8xTnHCKvPKnzEvz4CLdTQrevhZ1iXY4DUZfGpiPD7GInF43N4RxgF5sBNpV CeJFN32tq+JumIkVWGOG4q+bx3YbVbIwusv9D4IhkXm4/iLvL2ecTwONXpRzL4tv SfXJCfuHq2uNaPgckRJnqE8jOaTx/7TQ76vdneNSoVf0Alrkxd19KrZ/A== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrfeefgdeijecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefkffggfgfuvfevfhfhjggtgfesthejredttdefjeenucfhrhhomheprfgvthgv rhcugfhishgvnhhtrhgruhhtuceophgvthgvrhdrvghishgvnhhtrhgruhhtsegvnhhtvg hrphhrihhsvggusgdrtghomheqnecuggftrfgrthhtvghrnhepheelffeggedujeetiefh leetuddvieffhfffvdejvdffgeejkeduleduheduieefnecuvehluhhsthgvrhfuihiivg eptdenucfrrghrrghmpehmrghilhhfrhhomhepphgvthgvrhdrvghishgvnhhtrhgruhht segvnhhtvghrphhrihhsvggusgdrtghomh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 6 May 2022 09:49:29 -0400 (EDT) Message-ID: Date: Fri, 6 May 2022 15:49:28 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.9.0 Subject: Re: libpq async duplicate error results Content-Language: en-US To: Tom Lane , Alvaro Herrera Cc: Fabien COELHO , pgsql-hackers References: <202202081500.xl3iwa7doscz@alvherre.pgsql> <394797.1645388816@sss.pgh.pa.us> <1262938.1645658107@sss.pgh.pa.us> <1421785.1645723238@sss.pgh.pa.us> From: Peter Eisentraut In-Reply-To: <1421785.1645723238@sss.pgh.pa.us> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk I took another look at this. The output from the test program at the beginning of the thread is now (master branch): command = SELECT 'before'; result 1 status = PGRES_TUPLES_OK error message = "" command = SELECT pg_terminate_backend(pg_backend_pid()); result 1 status = PGRES_FATAL_ERROR error message = "FATAL: terminating connection due to administrator command " result 2 status = PGRES_FATAL_ERROR error message = "server closed the connection unexpectedly This probably means the server terminated abnormally before or while processing the request. " command = SELECT 'after'; PQsendQuery() error: FATAL: terminating connection due to administrator command server closed the connection unexpectedly This probably means the server terminated abnormally before or while processing the request. no connection to the server It appears the "after" query is getting the error message from the previous cycle somehow. The output in PG14 and PG13 is: command = SELECT 'after'; PQsendQuery() error: no connection to the server Is the change intended or do we need to think about more tweaking?