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 1m0t6C-0001ig-Bf for pgsql-hackers@arkaria.postgresql.org; Tue, 06 Jul 2021 21:59:24 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1m0t68-0003vc-VT for pgsql-hackers@arkaria.postgresql.org; Tue, 06 Jul 2021 21:59:20 +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 1m0t68-0003vU-3z for pgsql-hackers@lists.postgresql.org; Tue, 06 Jul 2021 21:59:20 +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 1m0t65-0004BP-Fq for pgsql-hackers@lists.postgresql.org; Tue, 06 Jul 2021 21:59:19 +0000 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.west.internal (Postfix) with ESMTP id 9E16032009C7; Tue, 6 Jul 2021 17:59:15 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Tue, 06 Jul 2021 17:59:15 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm3; bh=Dp+aop/K/uftcO5hvV48IuAkrZ0c68/GUqueftljzxo=; b=MW8nRfHz LwSSvXkfwe4z/eqJPqv2SzCc22OKdCYYgsl6EfMov0vqTXSK5D/9jwKUN6HpRokq ont/etAJw8IfQdaXBrzQF+Vm3FPhdrSGHBIuvzVmz7yIPA5JhX9ebt5SikxoGQif yIiCOvY8dhIdNPffM2vkuEY7Ngcvd9TDLAEn0Jx/GVXSA0rLfEloQYsiRrfT3ve/ eAS+axG61XxEL1vfHocXd8iF/CW1kkYq+BSEGVfP49ljBy/pkpX31mmcyJ0xi4wq 0TNwPzkjmsIzFfjb87E4OJ7UnCXWu51s0qlHB3vKUhfhjKdtxBWo63ptZX9bi8AY j4Ggv+50eg4ydA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrtdduucetufdoteggodetrfdotffvucfrrh hofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgenuceurghi lhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurh epfffhvffukfggtggugfgjsehtkeertddttdejnecuhfhrohhmpeetlhhvrghrohcujfgv rhhrvghrrgcuoegrlhhvhhgvrhhrvgesrghlvhhhrdhnohdqihhprdhorhhgqeenucggtf frrghtthgvrhhnpeefudelkeetiefggeeltddvvddvtdeludfgfefhtdeiveetfedtueeu heduuedvleenucffohhmrghinhepvghnthgvrhhprhhishgvuggsrdgtohhmpdhpohhsth hgrhgvshhqlhdrohhrghenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgr ihhlfhhrohhmpegrlhhvhhgvrhhrvgesrghlvhhhrdhnohdqihhprdhorhhg X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 6 Jul 2021 17:59:14 -0400 (EDT) Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id 6E14C2A223F; Tue, 6 Jul 2021 17:59:11 -0400 (-04) Date: Tue, 6 Jul 2021 17:59:11 -0400 From: Alvaro Herrera To: Daniel Gustafsson , Tom Lane Cc: Pg Hackers Subject: Re: trivial improvement to system_or_bail Message-ID: <202107062159.mnkybjgs2u23@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <608961.1625067927@sss.pgh.pa.us> <8AC32042-183D-452B-9B18-AA150BC99621@yesql.se> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2021-Jun-30, Daniel Gustafsson wrote: > + BAIL_OUT("system $_[0] failed: $!\n"); > I wonder if we should take more inspiration from the Perl manual and change it > to "failed to execute" to make it clear that the failure was in executing the > program, not from the program itself? You're right, that's a good distinction to make. I've used this wording. Thanks. > +1 for adding the extra details, but another thing that I've always found > very confusing is just the phrasing of the message itself. It makes > no sense unless (a) you know that "system" is Perl's function for > executing a shell command, (b) you are familiar with Perl's generally > cavalier approach to parentheses, and (c) you are also unbothered by > whether the word "failed" is part of the message text or the command > being complained of. We really need to do something to set off the > shell command's text from the surrounding verbiage a little better. > > I'd prefer something like > > command "pg_ctl start" failed: details here Done that way, thanks for the suggestion. Failures now look like this, respectively: Bailout called. Further testing stopped: failed to execute command "finitdb -D /home/alvherre/Code/pgsql-build/master/src/test/recovery/tmp_check/t_019_replslot_limit_primary_data/pgdata -A trust -N --wal-segsize=1": No such file or directory Bailout called. Further testing stopped: command "initdb -0D /home/alvherre/Code/pgsql-build/master/src/test/recovery/tmp_check/t_019_replslot_limit_primary_data/pgdata -A trust -N --wal-segsize=1" exited with value 1 Bailout called. Further testing stopped: command "initdb -0D /home/alvherre/Code/pgsql-build/master/src/test/recovery/tmp_check/t_019_replslot_limit_primary_data/pgdata -A trust -N --wal-segsize=1" died with signal 11 Previously it was just Bailout called. Further testing stopped: system initdb failed -- Álvaro Herrera Valdivia, Chile — https://www.EnterpriseDB.com/ "I must say, I am absolutely impressed with what pgsql's implementation of VALUES allows me to do. It's kind of ridiculous how much "work" goes away in my code. Too bad I can't do this at work (Oracle 8/9)." (Tom Allison) http://archives.postgresql.org/pgsql-general/2007-06/msg00016.php