Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit5ca40c5

Browse files
committed
Add comment about rationale for continuing to use C library functions
instead of src/timezone for timestamping log entries.
1 parentba6b87f commit5ca40c5

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

‎src/backend/utils/error/elog.c

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
*
3838
*
3939
* IDENTIFICATION
40-
* $PostgreSQL: pgsql/src/backend/utils/error/elog.c,v 1.140 2004/06/03 02:08:04 tgl Exp $
40+
* $PostgreSQL: pgsql/src/backend/utils/error/elog.c,v 1.141 2004/06/21 14:12:38 tgl Exp $
4141
*
4242
*-------------------------------------------------------------------------
4343
*/
@@ -1214,6 +1214,16 @@ log_line_prefix(StringInfo buf)
12141214
break;
12151215
case't':
12161216
{
1217+
/*
1218+
* Note: for %t and %s we deliberately use the C library's
1219+
* strftime/localtime, and not the equivalent functions
1220+
* from src/timezone. This ensures that all backends
1221+
* will report log entries in the same timezone, namely
1222+
* whatever C-library setting they inherit from the
1223+
* postmaster. If we used src/timezone then local
1224+
* settings of the TimeZone GUC variable would confuse
1225+
* the log.
1226+
*/
12171227
time_tstamp_time=time(NULL);
12181228
charstrfbuf[128];
12191229

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp