From: | Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com> |
---|---|
To: | Michael Paquier <michael(at)paquier(dot)xyz> |
Cc: | Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: convert elog(LOG) calls to ereport |
Date: | 2021-04-23 12:42:06 |
Message-ID: | c1a3656b-a596-05ec-2353-3dfc3657eae9@enterprisedb.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
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.
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2021-04-23 13:15:02 | Re: [bug?] Missed parallel safety checks, and wrong parallel safety |
Previous Message | Amit Langote | 2021-04-23 12:38:01 | Re: Table refer leak in logical replication |