Re: Fix for timestamp lag issue from emit_log_hook when GUC log_line_prefix has '%m'

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: Fix for timestamp lag issue from emit_log_hook when GUC log_line_prefix has '%m'
Дата
Msg-id ZffNWb5Zm8WZwMLY@paquier.xyz
обсуждение исходный текст
Ответ на Re: Fix for timestamp lag issue from emit_log_hook when GUC log_line_prefix has '%m'  (Kambam Vinay <vinaykambam@gmail.com>)
Ответы Re: Fix for timestamp lag issue from emit_log_hook when GUC log_line_prefix has '%m'  (Michael Paquier <michael@paquier.xyz>)
Список pgsql-hackers
On Sun, Mar 17, 2024 at 07:35:57PM +0530, Kambam Vinay wrote:
> Thanks Michael for the review. Agree with your comment on the patch.
> updated the patch with recommended change.

That should be fine.  I would suggest to document why the reset is
done at this location, aka this is to ensure that the same formatted
timestamp is used across the board, for all log destinations as well
as hook callers that rely on log_line_prefix.

While reviewing, I have noticed that a comment was not correct: JSON
logs also use the formatted timestamp via get_formatted_log_time().

I may be able to get this one committed just before the feature freeze
of v17, as timestamp consistency for hooks that call
log_status_format() is narrow.  For now, I have added an entry in the
CF app to keep track of it:
https://commitfest.postgresql.org/48/4901/
--
Michael

Вложения

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

Предыдущее
От: Amit Kapila
Дата:
Сообщение: Re: speed up a logical replica setup
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: Add new error_action COPY ON_ERROR "log"