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 1klBEV-0005Q9-Bi for pgsql-hackers@arkaria.postgresql.org; Fri, 04 Dec 2020 13:34:47 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1klBEU-0003cc-9f for pgsql-hackers@arkaria.postgresql.org; Fri, 04 Dec 2020 13:34:46 +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 1klBET-0003b1-Di for pgsql-hackers@lists.postgresql.org; Fri, 04 Dec 2020 13:34:46 +0000 Received: from [66.111.4.237] (helo=forward3-smtp.messagingengine.com) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1klBEP-0001kJ-3E for pgsql-hackers@postgresql.org; Fri, 04 Dec 2020 13:34:45 +0000 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailforward.nyi.internal (Postfix) with ESMTP id 5E3471943B37; Fri, 4 Dec 2020 08:34:29 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Fri, 04 Dec 2020 08:34:29 -0500 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=fm1; bh=dspq0u2lweLazPfZnEQEAwzxVG691HZWZE7TU3Uq2 2o=; b=gN/89QZV8coyDpDw90Ul9zj7XEu4eLUa9OZfh9GvRphdF2qo9SS/nYxeG aZ7Au3g9zn5fLWSUvcn+A3AdigQdvLf4pNzxgjnkqpkb37HE9Dd6p6cfoxY1IvD6 ONAUuywwxO8ZLEskGP+0Oyxx7Cngu5+dSk50jGPway2BgEqEoACR0/Mb3Xct68qp 2pfOqRA4w++vVJL5ZjcaCDCtAvTWCeuRHeXLMJypkQJBna8vzW80yWrwX9X79s3W nSdeO/v/dUfYHJowHteLO9lSIaMnstYveAUlVXvbutC8XBaRZ7OXCUPbl4PzFLh4 z+RuWK89+nfZDiezA+ImQU7KJSt5Q== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrudeikedgheefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepuffvfhfhohfkffgfgggjtgfgsehtjeertddtfeejnecuhfhrohhmpefrvght vghrucfgihhsvghnthhrrghuthcuoehpvghtvghrrdgvihhsvghnthhrrghuthesvghnth gvrhhprhhishgvuggsrdgtohhmqeenucggtffrrghtthgvrhhnpeehheeijefgvefhvdeh leekueevhfehhedvheetgffhteefgeeggfevjeejfffgvdenucfkphepkeejrddujeejrd ejvddrudegvdenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhr ohhmpehpvghtvghrrdgvihhsvghnthhrrghuthesvghnthgvrhhprhhishgvuggsrdgtoh hm X-ME-Proxy: Received: from april.pezone.net (p57b1488e.dip0.t-ipconnect.de [87.177.72.142]) by mail.messagingengine.com (Postfix) with ESMTPA id 6596E1080066; Fri, 4 Dec 2020 08:34:27 -0500 (EST) Subject: Re: convert elog(LOG) calls to ereport To: Alvaro Herrera References: <20201202140445.GA26406@alvherre.pgsql> Cc: pgsql-hackers From: Peter Eisentraut Organization: EnterpriseDB Message-ID: <41f5c5f7-3611-9bdc-cfad-9f61146419ff@enterprisedb.com> Date: Fri, 4 Dec 2020 14:34:26 +0100 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20201202140445.GA26406@alvherre.pgsql> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Host-Lookup-Failed: Reverse DNS lookup failed for 66.111.4.237 (deferred) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2020-12-02 15:04, Alvaro Herrera wrote: >> - elog(LOG, "WSAIoctl(SIO_KEEPALIVE_VALS) failed: %ui", >> - WSAGetLastError()); >> + ereport(LOG, >> + (errmsg("WSAIoctl(SIO_KEEPALIVE_VALS) failed: %ui", >> + WSAGetLastError()))); > > Please take the opportunity to move the flag name out of the message in > this one, also. done > 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. > Should fd.c messages do errcode_for_file_access() like elsewhere? yes, done