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 1lZv8V-00074T-Rf for pgsql-hackers@arkaria.postgresql.org; Fri, 23 Apr 2021 12:42:20 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lZv8U-0001G9-K1 for pgsql-hackers@arkaria.postgresql.org; Fri, 23 Apr 2021 12:42:18 +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 1lZv8T-0001G2-SL for pgsql-hackers@lists.postgresql.org; Fri, 23 Apr 2021 12:42:18 +0000 Received: from forward5-smtp.messagingengine.com ([66.111.4.239]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lZv8P-0005Oy-Rk for pgsql-hackers@postgresql.org; Fri, 23 Apr 2021 12:42:16 +0000 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailforward.nyi.internal (Postfix) with ESMTP id 0C3E219407A2; Fri, 23 Apr 2021 08:42:11 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Fri, 23 Apr 2021 08:42:11 -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:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; bh=ia3I8PBY4Rv5iWvRWYL5xH2rCkElvr0hSwCU657tj gE=; b=sTXCWKvIS3KRgX+INITE1KbFptPJ7ERs9QnG5CIGppv53HhQPXd6PIJoy 85jC/cDxnOae38OQ/5T76h60wFqai7pbocqGqc4kYFvZMMQahhL23co+nOCw25mb XtggOXjYleFGmICEq7w5195vlhRUamnxHA+XY+2KgeQk/qlMsJKSvcROqP0yyIqA ppSOxY5wUJQFf/2rUmYYT8IKXPi2ZwWe24vJYqZckomg3/reudKg4xi3YrRrHC8S oMd+MF8Gx2vsGnrqK5nt+VVJMpW3i1t0KSKkgDDiyh8cvXk1AaaHq7NOaMIXNHk2 ojfYZOt7qVxwCGeRDWWZtQRWpTtXA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrvdduvddgheeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepuffvfhfhkffffgggjggtgfesthejredttdefheenucfhrhhomheprfgvthgv rhcugfhishgvnhhtrhgruhhtuceophgvthgvrhdrvghishgvnhhtrhgruhhtsegvnhhtvg hrphhrihhsvggusgdrtghomheqnecuggftrfgrthhtvghrnhephfefleefueevuddvffeh jedtjeejgfelhfdtvdffheeludetudegfeeftdffffejnecukfhppeeluddrudegrddvvd egrdduvddtnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhho mhepphgvthgvrhdrvghishgvnhhtrhgruhhtsegvnhhtvghrphhrihhsvggusgdrtghomh X-ME-Proxy: Received: from laptop206oxuk.local (p5b0ee078.dip0.t-ipconnect.de [91.14.224.120]) by mail.messagingengine.com (Postfix) with ESMTPA id 4CAFF1080063; Fri, 23 Apr 2021 08:42:09 -0400 (EDT) Subject: Re: convert elog(LOG) calls to ereport To: Michael Paquier Cc: Alvaro Herrera , pgsql-hackers References: <20201202140445.GA26406@alvherre.pgsql> <41f5c5f7-3611-9bdc-cfad-9f61146419ff@enterprisedb.com> From: Peter Eisentraut Message-ID: Date: Fri, 23 Apr 2021 14:42:06 +0200 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.9.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 05.12.20 03:22, Michael Paquier wrote: > On Fri, Dec 04, 2020 at 02:34:26PM +0100, Peter Eisentraut wrote: >> On 2020-12-02 15:04, Alvaro Herrera wrote: >>> I do wonder if it'd be a good idea to move the syscall >>> name itself out of the message, too; that would reduce the number of >>> messages to translate 50x to just "%s(%s) failed: %m" instead of one >>> message per distinct syscall. >> >> Seems useful, but perhaps as a separate project. > > - elog(LOG, "getsockname() failed: %m"); > + ereport(LOG, > + (errmsg("getsockname() failed: %m"))); > FWIW, I disagree with the approach taken by eb93f3a. As of HEAD, it > is now required to translate all those strings. I think that it would > have been better to remove the function names from all those error > messages and not require the same pattern to be translated N times. I made another pass across this and implemented the requested change.