select open change scope Open full search

PG.CENTER connects PostgreSQL documentation, reference, and ecosystem knowledge. Maintained by Pigsty.

CONFIGURATION / REPORTING AND LOGGING

Sets the time zone used for timestamps written in the server log.

Type
string
Context
sighup
Measured default
GMT
Unit
Metadata snapshot
18

Definition PG 18 manual

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.

Measured default history
Version intervalDefault
9.0 – 9.0UNKNOWN
9.1 – 9.1Not specified
9.2 – 19GMT
Analysis & operational context

Authored guidance from the GUC source snapshot; the version-specific manual above is the definition reference. View source ↗

How it works

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.

Operational considerations

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.

Workload guidance

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.

Version history 2
  1. PG 9.1 → 9.2changed
  2. PG 9.0 → 9.1changed

Related entries

Further reading

Definition snapshot: english-manuals:8d504a17207289dd6e76969a46b… · English manual source