Re: pgsql: Convert debug message from ereport to elog

Поиск
Список
Период
Сортировка
От Tatsuo Ishii
Тема Re: pgsql: Convert debug message from ereport to elog
Дата
Msg-id 20180615.135300.2141289387353966369.t-ishii@sraoss.co.jp
обсуждение исходный текст
Ответ на Re: pgsql: Convert debug message from ereport to elog  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
Ответы Re: pgsql: Convert debug message from ereport to elog  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
Список 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


В списке pgsql-committers по дате отправления:

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: pgsql: Convert debug message from ereport to elog
Следующее
От: Tatsuo Ishii
Дата:
Сообщение: pgsql: Fix memory leak.