From: | Tatsuo Ishii <ishii(at)sraoss(dot)co(dot)jp> |
---|---|
To: | peter(dot)eisentraut(at)2ndquadrant(dot)com |
Cc: | pgsql-committers(at)lists(dot)postgresql(dot)org |
Subject: | Re: pgsql: Convert debug message from ereport to elog |
Date: | 2018-06-15 04:53:00 |
Message-ID: | 20180615.135300.2141289387353966369.t-ishii@sraoss.co.jp |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
Peter,
>> Just out of curiosity, what is the reason why you did this? I guess
>
> This made a message consistent with an analogous message in
> apply_handle_update() earlier in the file.
>
>> using elog instead of ereport for debugging message is preferable,
>> while for non debugging messages using ereport is preferable, but
>> actually sometimes elog is used for error messages in the file.
>
> I think this is not done perfectly consistently, and there are
> possibilities for improvement.
Thanks for the explanation. Probably we want add/change something to
"54.2. Reporting Errors Within the Server" In this section I see:
There is an older function elog that is still heavily used. An elog call:
:
:
Therefore, elog should be used only for internal errors and low-level debug logging.
From the last sentence I feel like elog is not recommended for any
puporse (and ereport will better even for this case). But if we prefer
to use elog for internal errors and low-level debug logging over
ereport, then above might be better changed something like:
Therefore, elog should be used only for internal errors and low-level
debug logging. Also for these purposes ereport should not be used.
What do you think?
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese:http://www.sraoss.co.jp
From | Date | Subject | |
---|---|---|---|
Next Message | Tatsuo Ishii | 2018-06-15 07:41:57 | pgsql: Fix memory leak. |
Previous Message | Peter Eisentraut | 2018-06-15 04:24:15 | Re: pgsql: Convert debug message from ereport to elog |