postgresql/src/backend/utils/error
Michael Paquier 2a217c3717 Coordinate emit_log_hook and all log destinations to share the same timeval
This would cause the timestamp values used by emit_log_hook and all the
other log destinations to differ, because the timestamps are reset
before sending the logs to the server and after calling the hook.

This change matters for emit_log_hook when generating log information
with 'n' or 'm' in log_line_prefix through log_status_format(), or when
doing direct calls to get_formatted_log_time() like in the JSON or CSV
log formats.

While on it, this commit fixes a couple of comments related to the
formatted timestamps where the JSON was not mentioned.  Oversight in
dc686681e0, that I have noticed while reviewing this patch.

Author: Kambam Vinay, Michael Paquier
Discussion: https://postgr.es/m/CANiRfmsK36A0i8mnQtzaxhSm3CUCimPwJPp4WQNq53OdSNkgWg@mail.gmail.com
2024-04-04 14:15:22 +09:00
..
Makefile Introduce log_destination=jsonlog 2022-01-17 10:16:53 +09:00
assert.c Update copyright for 2024 2024-01-03 20:49:05 -05:00
csvlog.c Remove unused #include's from backend .c files 2024-03-04 12:02:20 +01:00
elog.c Coordinate emit_log_hook and all log destinations to share the same timeval 2024-04-04 14:15:22 +09:00
jsonlog.c Remove unused #include's from backend .c files 2024-03-04 12:02:20 +01:00
meson.build Update copyright for 2024 2024-01-03 20:49:05 -05:00