{"Entry":{"collection":"guc","key":"log_timezone","name":"log_timezone","aliases":[],"metadata":{"baseline":false,"boot_human":"Not specified","boot_val":null,"category":"Reporting and Logging / What to Log","category_zh":"","changed_in":["9.1","9.2"],"changes":[{"documentation_changed":false,"fields":{},"from":"8.2","status":"added","to":"8.3"},{"documentation_changed":true,"fields":{},"from":"8.4","status":"changed","to":"9.0"},{"documentation_changed":true,"fields":{"boot_val":{"from":"UNKNOWN","to":null}},"from":"9.0","status":"changed","to":"9.1"},{"documentation_changed":true,"fields":{"boot_val":{"from":null,"to":"GMT"}},"from":"9.1","status":"changed","to":"9.2"}],"content_hash":"37d57379ccd949be8479b6136c8cf0e6af72deec6518e325850d1424230385cb","context":"","default_changed_in":["9.1","9.2"],"default_history":[{"from":"9.0","to":"9.0","value":"UNKNOWN"},{"from":"9.1","to":"9.1","value":"Not specified"},{"from":"9.2","to":"19","value":"GMT"}],"derived_content_hash":"9f41c82aad8f3f4ba075185ed43bde8f3d43ad636e2761cf9126a49fde73efc9","documentation_refresh":{"batch":"20261113","original_source_rev":"wiki-repair-20261023:2063c9f88280d2d79c4269135cdb070b6a6a538851a1b5ca494f1ed304f9a746","versions":{"14":"14.25","15":"15.20","16":"16.16","17":"17.12","18":"18.7","19":"19rc2"}},"editorial":{"advice":{"olap":"Analytical workload type does not justify a separate log timezone. Keep UTC or the fleet standard and convert to local civil time only in reporting tools, especially across DST transitions.","oltp":"Use one cluster-wide timezone, normally UTC, so every session's server-log timestamps correlate across hosts, replicas, failovers, and centralized ingestion. Test parsers and log_filename expansion before changing it.","small":"Keep UTC unless an existing operational pipeline requires another stable zone. Changing log_timezone does not reduce log volume; it changes timestamp interpretation and potentially rotated filenames."},"mechanism":["log_timezone sets the time zone to use in log messages. It affects timestamps rendered by the logging system, including filename expansion context, but does not change session TimeZone or stored timestamps.","log_timezone is a SIGHUP-context setting: a configuration reload activates the new server value without a restart; subsequent operations that consult it use the refreshed value.","It changes emitted diagnostic data rather than query semantics, but volume, sensitive content, log_line_prefix, destinations, collector throughput, and retention determine operational cost and usefulness."],"pitfalls":["Editing log_timezone without reloading configuration and verifying the effective value and subsequent behavior.","Enabling richer logging without budgeting collector throughput, storage, retention, and downstream query cost.","Writing SQL text, bind values, identities, or host data without a redaction and access-control policy.","Changing log_timezone globally without a rollback plan and a client or operational compatibility test."],"references":[{"title":"PostgreSQL 19 Beta 4: log_timezone","url":"https://www.postgresql.org/docs/19/runtime-config-logging.html#GUC-LOG-TIMEZONE"},{"title":"PostgreSQL 19 release notes","url":"https://www.postgresql.org/docs/19/release-19.html"}],"related":["DateStyle","IntervalStyle","TimeZone","lc_time","timezone_abbreviations"],"summary":"log_timezone is the PostgreSQL setting that defines the time zone to use in log messages."},"enumvals":[],"first_version":"8.3","group":"Reporting and Logging","group_slug":"logging","imported_at":"2026-09-30T00:40:57.442491+08:00","intro_commit":{},"key":"log_timezone","last_version":"20","max_val":"","min_val":"","name":"log_timezone","position":254,"present_in":["8.3","8.4","9.0","9.1","9.2","9.3","9.4","9.5","9.6","10","11","12","13","14","15","16","17","18","19","20"],"repair_provenance":{"original_source_revision":"english-manuals:e16e956acd5bddd6888a77b333967f71531b352a1bed4fed2e9e43e828f8d815","receipt_sha256":"face1780f6162b094913e5ea9ccadf363e5b6ff05176012ff0d73b90bec48d01","repair":"wiki-repair-20261023"},"short_desc":"Sets the time zone used for timestamps written in the server log.","short_desc_zh":"","source_rev":"wiki-repair-20261023:2063c9f88280d2d79c4269135cdb070b6a6a538851a1b5ca494f1ed304f9a746","unit":"","vartype":"string"}},"Definition":{"Collection":"guc","Key":"log_timezone","SourceDatabase":"center","Version":"18","SourceTable":"guc","SourceKey":"log_timezone","SourceRevision":"wiki-repair-20261023:2063c9f88280d2d79c4269135cdb070b6a6a538851a1b5ca494f1ed304f9a746","Facts":{"boot_val":"GMT","category":"Reporting and Logging / What to Log","context":"sighup","description":"Sets the time zone used for timestamps written in the server log. Unlike TimeZone, this value is cluster-wide, so that all sessions will report timestamps consistently. The built-in default is GMT, but that is typically overridden in postgresql.conf; initdb will install a setting there corresponding to its system environment. See Section 8.5.3 for more information. This parameter can only be set in the postgresql.conf file or on the server command line.","description_zh":"设置在服务器日志中写入的时间戳的时区。和 TimeZone 不同，这个值是集簇范围的，因此所有会话将报告一致的时间戳。内置默认值是 GMT，但是通常会被在 postgresql.conf 中覆盖。initdb 将安装一个对应于其系统环境的设置。详见第 8.5.3 节。这个参数只能在 postgresql.conf 文件中或在服务器命令行上设置。","description_zh_html":"\u003cp\u003e\n        设置在服务器日志中写入的时间戳的时区。和 \u003ca class=\"xref\" href=\"/zh/docs/18/runtime-config-client.html#GUC-TIMEZONE\"\u003eTimeZone\u003c/a\u003e 不同，这个值是集簇范围的，因此所有会话将报告一致的时间戳。内置默认值是 \u003ccode class=\"literal\"\u003eGMT\u003c/code\u003e，但是通常会被在 \u003ccode class=\"filename\"\u003epostgresql.conf\u003c/code\u003e 中覆盖。\u003cspan class=\"application\"\u003einitdb\u003c/span\u003e 将安装一个对应于其系统环境的设置。详见\u003ca class=\"xref\" href=\"/zh/docs/18/datatype-datetime.html#DATATYPE-TIMEZONES\" title=\"8.5.3. 时区\"\u003e第 8.5.3 节\u003c/a\u003e。这个参数只能在 \u003ccode class=\"filename\"\u003epostgresql.conf\u003c/code\u003e 文件中或在服务器命令行上设置。\n       \u003c/p\u003e","doc":{"anchor":"GUC-LOG-TIMEZONE","file":"runtime-config-logging.html","lang":"en","sha256":"278d913b9c0f735c5cd7b35fd7205826bbd9c449805370d2dbe54105c0ed1d88","slug":"18"},"doc_html":"\u003cp\u003e\n        Sets the time zone used for timestamps written in the server log.\n        Unlike \u003ca class=\"xref\" href=\"/docs/18/runtime-config-client.html#GUC-TIMEZONE\"\u003eTimeZone\u003c/a\u003e, this value is cluster-wide,\n        so that all sessions will report timestamps consistently.\n        The built-in default is \u003ccode class=\"literal\"\u003eGMT\u003c/code\u003e, but that is typically\n        overridden in \u003ccode class=\"filename\"\u003epostgresql.conf\u003c/code\u003e; \u003cspan class=\"application\"\u003einitdb\u003c/span\u003e\n        will install a setting there corresponding to its system environment.\n        See \u003ca class=\"xref\" href=\"/docs/18/datatype-datetime.html#DATATYPE-TIMEZONES\" title=\"8.5.3. Time Zones\"\u003eSection 8.5.3\u003c/a\u003e for more information.\n        This parameter can only be set in the \u003ccode class=\"filename\"\u003epostgresql.conf\u003c/code\u003e\n        file or on the server command line.\n       \u003c/p\u003e","doc_same_as":"","documentation_revision":{"inputs":[{"file":"runtime-config-logging.html","kind":"same-version-reviewed-manual","locale":"en","sha256":"278d913b9c0f735c5cd7b35fd7205826bbd9c449805370d2dbe54105c0ed1d88","version":"18.7"},{"file":"runtime-config-logging.html","kind":"same-version-reviewed-manual","locale":"zh-Hans","sha256":"68c010254e1859ec0b76f06a563babd51a6c38997f1242e35e4c6b649724b1cb","version":"18.7"}],"release":"18.7","runtime_remeasured":false,"source_revision":"pgdoc:b9f0e7232f60f380d642ac9b99226606c254b552"},"documented":true,"enumvals":null,"extra_desc":null,"lang":"en","max_val":null,"metadata_version":"18","min_val":null,"name":"log_timezone","short_desc":"Sets the time zone to use in log messages.","source":"pg-settings-source-snapshot","translation_provenance":{"inputs":[{"kind":"current-pgdoc-translation","path":"/Users/vonng/pgsty/pgdoc/zh/18/html/runtime-config-logging.html","sha256":"a322f5293f10e348b5fc5dca98fdb6af52462723a215b8701c3b9d933e2933b4"}],"kind":"same-version-pgdoc","locale":"zh-Hans","source_revision":"b1b500221dbe5437cfca004d6b04d3f6e422765d","version":"18"},"unit":null,"vartype":"string","zh_from":"same-version-manual"},"ManualEvidence":{"doc":{"anchor":"GUC-LOG-TIMEZONE","file":"runtime-config-logging.html","lang":"en","sha256":"278d913b9c0f735c5cd7b35fd7205826bbd9c449805370d2dbe54105c0ed1d88","slug":"18"}},"MeasuredEvidence":{"metadata_version":"18"}},"Text":{"Collection":"guc","Key":"log_timezone","SourceDatabase":"center","Version":"18","Locale":"en","Title":"log_timezone","Summary":"Sets the time zone used for timestamps written in the server log. Unlike TimeZone, this value is cluster-wide, so that all sessions will report timestamps consistently. The built-in default is GMT, but that is typically overridden in postgresql.conf; initdb will install a setting there corresponding to its system environment. See Section 8.5.3 for more information. This parameter can only be set in the postgresql.conf file or on the server command line.","BodyHTML":"\u003cp\u003e\n        Sets the time zone used for timestamps written in the server log.\n        Unlike \u003ca href=\"/docs/18/runtime-config-client.html#GUC-TIMEZONE\" rel=\"nofollow\"\u003eTimeZone\u003c/a\u003e, this value is cluster-wide,\n        so that all sessions will report timestamps consistently.\n        The built-in default is \u003ccode\u003eGMT\u003c/code\u003e, but that is typically\n        overridden in \u003ccode\u003epostgresql.conf\u003c/code\u003e; \u003cspan\u003einitdb\u003c/span\u003e\n        will install a setting there corresponding to its system environment.\n        See \u003ca href=\"/docs/18/datatype-datetime.html#DATATYPE-TIMEZONES\" rel=\"nofollow\"\u003eSection 8.5.3\u003c/a\u003e for more information.\n        This parameter can only be set in the \u003ccode\u003epostgresql.conf\u003c/code\u003e\n        file or on the server command line.\n       \u003c/p\u003e","SourceRevision":"wiki-repair-20261023:2063c9f88280d2d79c4269135cdb070b6a6a538851a1b5ca494f1ed304f9a746","ContentHash":"407390e0ba983a04261d518b78fa7c8b1e49a0b58120963612b6104bcc6ad60f","Payload":{"description":"Sets the time zone used for timestamps written in the server log. Unlike TimeZone, this value is cluster-wide, so that all sessions will report timestamps consistently. The built-in default is GMT, but that is typically overridden in postgresql.conf; initdb will install a setting there corresponding to its system environment. See Section 8.5.3 for more information. This parameter can only be set in the postgresql.conf file or on the server command line."}},"RequestedLocale":"en","Fallback":false,"Versions":["10","11","12","13","14","15","16","17","18","19","20","8.3","8.4","9.0","9.1","9.2","9.3","9.4","9.5","9.6"],"Locales":["en","zh-Hans"],"Signatures":null,"Spellings":null,"SQLState":null,"Evidence":null}
