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 1klNE4-0005Xq-4b for pgsql-hackers@arkaria.postgresql.org; Sat, 05 Dec 2020 02:23: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 1klNDU-0007ZV-S2 for pgsql-hackers@arkaria.postgresql.org; Sat, 05 Dec 2020 02:22:32 +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 1klNDU-0007ZO-Gs for pgsql-hackers@lists.postgresql.org; Sat, 05 Dec 2020 02:22:32 +0000 Received: from [64.147.123.25] (helo=wout2-smtp.messagingengine.com) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1klNDS-0001XZ-0h for pgsql-hackers@postgresql.org; Sat, 05 Dec 2020 02:22:31 +0000 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.west.internal (Postfix) with ESMTP id 626068E7; Fri, 4 Dec 2020 21:22:18 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Fri, 04 Dec 2020 21:22:18 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm3; bh=bN3HjR5zdjF2xZtBBoGdrRPlZPg FjtNX1ZbMofyAGqE=; b=Nuuk6awhsvbpXaHN/MYF7uGb7Dx27bsg4ilPhDs+nsO yv+7SV1B42lfM65oMw7Om6TSTNPxPeoHo8zb32gxEmqPnNGPR+uRKT/JHwFQaB+g Xio1huL+23R/gWk+KBuv85LWwSaiN+mS2DVvpvsPYp9RNuIU1+e+SfyrVXvmDdBg wZ5F3aArgWFcNvkhvVnPY06cFYqg8B3xMzmOq7zRVGQdyPGoReXjjtWSeOKQyYtq lAp7UwNJTpnxOuv871OBs+ydhsdj2Yr8FWfkPejGBYLxnoyKrhu4pdu1OtOd2DE/ NL4P6rCUtpU9z6qf9bT7yT13OwsTST9ou+5JY3nQgbQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc: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=fm1; bh=bN3HjR 5zdjF2xZtBBoGdrRPlZPgFjtNX1ZbMofyAGqE=; b=DoVAfrHTX5B7lWu1UR6DRl U6J9WOhHe/p2/SpG7MnZ72XAK1ww6xTGJB41QqjPrQkkAL+AeVwvJ4p/ha/BfSKd b6kkJheTDcKrODChKqzYgMp5Dc+b5nfuFvT+fFTZeJXjUQvy7V3VXAicns/k7x+n Qu0+/2z130uFuneNlHVnaW6cP/vNDvLU/DUTMpO5boXvwY3uUnbUfV/Mpl/Nx7sS kxXtjgKWC4CMJPBjgDcNpVCPqrrikOLht/Qh9+FGWMLwzqtzt9jgQ+YOiKRFk4rl MWYlmU2d7TqsZWbCfoaj9uJn9vifgrlLjxfGGCtufpqavIJYlN8CKRdmmtRund3w == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrudeiledggeefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne gfrhhlucfvnfffucdljedtmdenucfjughrpeffhffvuffkfhggtggujgesghdtreertddt vdenucfhrhhomhepofhitghhrggvlhcurfgrqhhuihgvrhcuoehmihgthhgrvghlsehprg hquhhivghrrdighiiiqeenucggtffrrghtthgvrhhnpedvgeduuefhtdeuleettdevjeeh heeiveeuieegleetgeeljeelieeuieehgeevhfenucfkphepudduuddruddtvddrudektd drudekheenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhm pehmihgthhgrvghlsehprghquhhivghrrdighiii X-ME-Proxy: Received: from paquier.xyz (ee0822lan1.rev.em-net.ne.jp [111.102.180.185]) by mail.messagingengine.com (Postfix) with ESMTPA id 1CCC31080063; Fri, 4 Dec 2020 21:22:15 -0500 (EST) Date: Sat, 5 Dec 2020 11:22:12 +0900 From: Michael Paquier To: Peter Eisentraut Cc: Alvaro Herrera , pgsql-hackers Subject: Re: convert elog(LOG) calls to ereport Message-ID: References: <20201202140445.GA26406@alvherre.pgsql> <41f5c5f7-3611-9bdc-cfad-9f61146419ff@enterprisedb.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="p98T0s8agRoW/9Sx" Content-Disposition: inline In-Reply-To: <41f5c5f7-3611-9bdc-cfad-9f61146419ff@enterprisedb.com> X-Host-Lookup-Failed: Reverse DNS lookup failed for 64.147.123.25 (deferred) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --p98T0s8agRoW/9Sx Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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. >=20 > 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. -- Michael --p98T0s8agRoW/9Sx Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAl/K7tQACgkQnvQgOdby QH0+6BAAiO6O0SD8bNS7HVVSitY8F4OY9TOmxlySQwLyP41/kzv3TOl7L+f5iUXW Krt7ftFwRVBkO0V7SP4t5mrNg+cWrzJlXw+REkqU/jSmCWrcHcL90bm4pvH/Cj5t Z08XsxDtk+6Orvp0kXI4G6DzFm/mEUmx2GJvqXj9HfuJ44Xe0G6F6Er5r523i8yR liT49gZ3yUJV5KhZKqD0faXbjr2N3Q7m/OWqqj5G5RgIYKlZhRpE3cErxSJ/JAy9 dRUImiaV4YcBcLIPeCtZFnXqAtpnNijfoJy7lpFMzkwa8Ew4hxv2dTsXp73C4wOO KlAVNevmbJhtJWTUsaAgsrqSOqY+mVhYIYjA3QkQoCdlAg+fBszd3giRmQOdxSMC 06/Q0Rcxi7hW7EQOXf5XLih6X2PbHlvA7pBKrP2LTi0UXTAJsRTYCR1toY3jF85L pPTL/lb1sllrZA7NzBjZeDNfxUy1pDrfQ/5SpEh4cG2MHY3G2yCZOtH5BsTCVkcc 6k4wPjvXlRi9GRBCA9YW3pVUcw7Hm4GJsIpSnvqPt57pXxDw9LmuMQdK1nvoQOPs TKPYsZ6dJb3RTH+EvuVkzwwzAjQmvNAGuHxPW0ISezA+TNWXZAxmUWlIKltAHoL4 PCwcg6fcOB76R3dAzReEeYzQ4G4UJ4lxmk1yV3nh++J90Mh01c4= =MQDl -----END PGP SIGNATURE----- --p98T0s8agRoW/9Sx--