pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Peter Eisentraut <peter.eisentraut@enterprisedb.com>
To: Alvaro Herrera <alvherre@alvh.no-ip.org>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Subject: Re: convert elog(LOG) calls to ereport
Date: Fri, 4 Dec 2020 14:34:26 +0100
Message-ID: <41f5c5f7-3611-9bdc-cfad-9f61146419ff@enterprisedb.com> (raw)
In-Reply-To: <20201202140445.GA26406@alvherre.pgsql>
References: <20201202140445.GA26406@alvherre.pgsql>

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





view thread (9+ messages)  latest in thread

Message-ID: <41f5c5f7-3611-9bdc-cfad-9f61146419ff@enterprisedb.com>
Permalink:  ../41f5c5f7-3611-9bdc-cfad-9f61146419ff@enterprisedb.com/
Also on:    postgresql.org/message-id/41f5c5f7-3611-9bdc-cfad-9f61146419ff@enterprisedb.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-hackers@postgresql.org
  Cc: peter.eisentraut@enterprisedb.com, alvherre@alvh.no-ip.org
  Subject: Re: convert elog(LOG) calls to ereport
  In-Reply-To: <41f5c5f7-3611-9bdc-cfad-9f61146419ff@enterprisedb.com>
  References: <20201202140445.GA26406@alvherre.pgsql> <41f5c5f7-3611-9bdc-cfad-9f61146419ff@enterprisedb.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox