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 1lycPg-0007Mo-0X for pgsql-hackers@arkaria.postgresql.org; Wed, 30 Jun 2021 15:46:08 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lycP9-0001TR-9Z for pgsql-hackers@arkaria.postgresql.org; Wed, 30 Jun 2021 15:45: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 1lycP9-0001TJ-1x for pgsql-hackers@lists.postgresql.org; Wed, 30 Jun 2021 15:45:35 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lycP4-0001Wg-Lv for pgsql-hackers@lists.postgresql.org; Wed, 30 Jun 2021 15:45:34 +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 15UFjR0c608962; Wed, 30 Jun 2021 11:45:27 -0400 From: Tom Lane To: Alvaro Herrera cc: Pg Hackers Subject: Re: trivial improvement to system_or_bail In-reply-to: <202106301524.eq5pblzstapj@alvherre.pgsql> References: <202106301524.eq5pblzstapj@alvherre.pgsql> Comments: In-reply-to Alvaro Herrera message dated "Wed, 30 Jun 2021 11:24:33 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <608960.1625067927.1@sss.pgh.pa.us> Date: Wed, 30 Jun 2021 11:45:27 -0400 Message-ID: <608961.1625067927@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Alvaro Herrera writes: > When PostgresNode::system_or_bail() fails, it's quite opaque as to what > is happening. This patch improves things by printing some detail, as > suggested in Perl's doc for system(). +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 regards, tom lane