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 1nWfsA-0005bN-Pp for pgsql-hackers@arkaria.postgresql.org; Tue, 22 Mar 2022 14:52:35 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nWfs9-0002e5-MV for pgsql-hackers@arkaria.postgresql.org; Tue, 22 Mar 2022 14:52:33 +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 1nWfs8-0002dw-IR for pgsql-hackers@lists.postgresql.org; Tue, 22 Mar 2022 14:52:33 +0000 Received: from out5-smtp.messagingengine.com ([66.111.4.29]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nWfs2-0004St-Bm for pgsql-hackers@lists.postgresql.org; Tue, 22 Mar 2022 14:52:32 +0000 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id 65FA75C010B; Tue, 22 Mar 2022 10:52:24 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Tue, 22 Mar 2022 10:52:24 -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=fm3; bh=sgO0jcsVTajOPSHU7BbMUTt1L2iDjLlEGSk2y8Ahu 28=; b=oGqBtrOfFmLc3E1QJV9WwrK17ZCpfEUk/Qsoo0pLUChGSeKxXCP2N0Q3Z BiRj5A7wDQGNBSYLTsNO2C+Qs6YSL/gRZG60C1SArLVQ2mT0fmbaS2aDf0IBh3Dw VC8F1T+dmvbw8QmKSFHKFwvwh69niQf+1O5pQ1qqimC8wnrcS7Q35nl1+Y4Awxwz u6vzWxR0pNB6otMJ/0b4xkN1Ynykml0JH/rje3VlgO67DmS1uLjaFibt/F5+1I3r W3XlETCe4RGKObcDCxqtJmWSZkXRjWP+m6thKf3jHdystmynwexW5p0WhSHkmgXZ jFm/iE2LPSa4QbO6Gtj2/p9/sgPfg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrudeghedgieejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvfhfhjggtgfesthejredttdefjeenucfhrhhomheprfgvthgv rhcugfhishgvnhhtrhgruhhtuceophgvthgvrhdrvghishgvnhhtrhgruhhtsegvnhhtvg hrphhrihhsvggusgdrtghomheqnecuggftrfgrthhtvghrnhepffevgfeuudeuleeiueef jedvhffftedttddugedvueeutdduvdehvdehffdujefhnecuffhomhgrihhnpehpohhsth hgrhgvshhqlhdrohhrghenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgr ihhlfhhrohhmpehpvghtvghrrdgvihhsvghnthhrrghuthesvghnthgvrhhprhhishgvug gsrdgtohhm X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 22 Mar 2022 10:52:23 -0400 (EDT) Message-ID: <63350f81-6a43-f536-24e6-b30f48797732@enterprisedb.com> Date: Tue, 22 Mar 2022 15:52:21 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.7.0 Subject: Re: psql - add SHOW_ALL_RESULTS option Content-Language: en-US To: Fabien COELHO Cc: "pgsql-hackers@lists.postgresql.org" References: <18c78a01-4a34-9dd4-f78b-6860f1420c8e@enterprisedb.com> <6954328d-96f2-77f7-735f-7ce493a40949@enterprisedb.com> <2570e2ae-fa0f-aac9-f72f-bb59a9983a20@enterprisedb.com> <46259d13-5f90-1475-3c85-d7a597a2b862@enterprisedb.com> <20220113054433.wdjhidtm7gvyhfts@alap3.anarazel.de> <805c0496-d60d-802b-3d61-73fed38dea16@enterprisedb.com> From: Peter Eisentraut In-Reply-To: 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 On 17.03.22 19:04, Fabien COELHO wrote: > > Hello Peter, > >>> See attached v16 which removes the libpq workaround. >> >> I suppose this depends on >> >> https://www.postgresql.org/message-id/flat/ab4288f8-be5c-57fb-2400-e3e857f53e46%40enterprisedb.com >> >> >> getting committed, because right now this makes the psql TAP tests >> fail because of the duplicate error message. >> >> How should we handle that? > > Ok, it seems I got the patch wrong. > > Attached v17 is another try. The point is to record the current status, > whatever it is, buggy or not, and to update the test when libpq fixes > things, whenever this is done. Your patch contains this test case: +# Test voluntary crash +my ($ret, $out, $err) = $node->psql( + 'postgres', + "SELECT 'before' AS running;\n" . + "SELECT pg_terminate_backend(pg_backend_pid());\n" . + "SELECT 'AFTER' AS not_running;\n"); + +is($ret, 2, "server stopped"); +like($out, qr/before/, "output before crash"); +ok($out !~ qr/AFTER/, "no output after crash"); +is($err, 'psql::2: FATAL: terminating connection due to administrator command +psql::2: 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. +psql::2: fatal: connection to server was lost', "expected error message"); The expected output (which passes) contains this line twice: psql::2: FATAL: terminating connection due to administrator command psql::2: FATAL: terminating connection due to administrator command If I paste this test case into current master without your patch, I only get this line once. So your patch is changing this output. The whole point of the libpq fixes was to not have this duplicate output. So I think something is still wrong somewhere.