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 1nZClp-00034w-83 for pgsql-hackers@arkaria.postgresql.org; Tue, 29 Mar 2022 14:24:29 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nZClo-0008U3-4o for pgsql-hackers@arkaria.postgresql.org; Tue, 29 Mar 2022 14:24:28 +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 1nZCln-0008Sx-Qw for pgsql-hackers@lists.postgresql.org; Tue, 29 Mar 2022 14:24:27 +0000 Received: from wout1-smtp.messagingengine.com ([64.147.123.24]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nZClk-0005i7-Db for pgsql-hackers@lists.postgresql.org; Tue, 29 Mar 2022 14:24:26 +0000 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.west.internal (Postfix) with ESMTP id BBCAE3202051; Tue, 29 Mar 2022 10:24:21 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Tue, 29 Mar 2022 10:24:22 -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=HgyoSLnSDlKZoiN8VtDxJK41P9xKy4klLjGY7uNJJ H0=; b=SyY1k+ShUYnpr/NE0jVtcbQ7/zz6VEUW1U2WaVhAX2f2etgJhQv6LRPFA ubP+94T+sWVBvllQI9oYJLzEnMjQV9BGSoJU4vxgac1GruOT8zz7FTKiAmoW+84t TH5EImePin5IBLPPQ1khnqW3Y+kDYWs20FqjvNzguxz/cw90AXBjajF//MjNuQ+y sAaQZI7ClQjCa4akkkjumWDTbXV9QRl+jghPOjXQkFxZNcPADQh0XYpq7LMLncsB 3Bm5TPnvXyOwMne8atnSZYqbxPK0esMx/lsPaQi7Qufx2KX2vQvG+buRIqSFyReO W6E1bgTV9lx230vGLCSazjwBhML3g== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrudeitddgheduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvfhfhjggtgfesthejredttdefjeenucfhrhhomheprfgvthgv rhcugfhishgvnhhtrhgruhhtuceophgvthgvrhdrvghishgvnhhtrhgruhhtsegvnhhtvg hrphhrihhsvggusgdrtghomheqnecuggftrfgrthhtvghrnhepfeejgeehteeuhfevvedu leeufedtjeetiefftedvudfhtdeifefgueettdevgefgnecuvehluhhsthgvrhfuihiivg eptdenucfrrghrrghmpehmrghilhhfrhhomhepphgvthgvrhdrvghishgvnhhtrhgruhht segvnhhtvghrphhrihhsvggusgdrtghomh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 29 Mar 2022 10:24:20 -0400 (EDT) Message-ID: <6acbce27-3472-fc58-538b-ba6770ed0bfa@enterprisedb.com> Date: Tue, 29 Mar 2022 16:24:18 +0200 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: Frontend error logging style Content-Language: en-US To: Tom Lane , Andres Freund Cc: Robert Haas , Michael Paquier , PostgreSQL Hackers References: <913687.1645572199@sss.pgh.pa.us> <6fdb3ab3-f093-27b9-dfdc-c391e69163fc@enterprisedb.com> <1346360.1645715441@sss.pgh.pa.us> <1895619.1645809325@sss.pgh.pa.us> <20220322015135.k4tcd3tsjq5xydqa@alap3.anarazel.de> <2446238.1647914437@sss.pgh.pa.us> <20220322021348.pvtvgrseyfohkxob@alap3.anarazel.de> <471299.1648412393@sss.pgh.pa.us> From: Peter Eisentraut In-Reply-To: <471299.1648412393@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 On 27.03.22 22:19, Tom Lane wrote: > Here's a rebase up to today's HEAD. I've fixed the merge problems, > but there may be some stray new error calls that could be converted > to use pg_fatal() and haven't been. I don't want to do a full > fresh scan of the code until we're about ready to commit this. This looks like a good improvement to me. I think I would want the program name/location also in front of the detail and hint lines. I need to think about this a bit more. This shouldn't hold up this patch; it would be a quick localized change. (I'm also thinking about providing a separate color code for the secondary messages. Again, this could be a quick follow-up patch.) The one change I didn't like was - pg_log_error("The program \"%s\" is needed by %s but was not found in the\n" - "same directory as \"%s\".\n" - "Check your installation.", + pg_log_error("the program \"%s\" is needed by %s but was not found in the same directory as \"%s\"", "postgres", progname, full_path); This appears to prioritize the guideline "don't punctuate error message as full sentence" over what should be the actual guideline "don't make the error message a full sentence". There are other occurrences of a similar message that were not changed in the same way by the patch. Maybe we should leave this one alone in this patch and consider rewriting the message instead.