# log_timezone

> log_timezone is the PostgreSQL setting that defines the time zone to use in log messages.
---

> [!NOTE]
> **Fact — official short description:** “Sets the time zone to use in log messages.”

## Identity {#identity}

| Field | Value | Meaning |
| --- | --- | --- |
| Type | `string` | Upstream pg_settings type |
| Context | `sighup` | Takes effect after configuration reload |
| Unit | — | Raw unit |
| Range | — | Raw limits in the last observed version |
| Enum values | — | — for non-enum types |
| Category | Reporting and Logging / What to Log | Upstream classification |
| Latest boot value | `GMT` | GMT |
{.fields meta="-"}

## Lifecycle {#lifecycle}

| Fact | Value |
| --- | --- |
| First observed | PG9.0 (research boundary) |
| Present in | PG9.0–19 Beta 3 |
| Removed in | No |
| Introduction commit | Not asserted: predates the PG9.0 research boundary |
| Commit date | — |
| Discussion | — |

## Default history {#default-history}

| Versions | Raw `boot_val` | Unit | Human value |
| --- | --- | --- | --- |
| PG9.0 | `UNKNOWN` | — | UNKNOWN |
| PG9.1 | — | — | not set |
| PG9.2–19 Beta 3 | `GMT` | — | GMT |
{.full-width caption="Measured PG9.0–19 Beta 3 boot defaults"}

## How it works {#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.

## Tuning advice {#tuning-advice}

> [!TIP]
> **Advice.** These are workload-specific starting points and must be validated with measurements.

| Workload | Guidance |
| --- | --- |
| 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. |
| 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. |
| Small nodes | 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. |
{.full-width}

## Pigsty {#pigsty}

Values use the fixed 8-vCPU, 32-GiB, 100-GiB SSD fixture and render the current Pigsty templates for PG19 Beta 3; this does not assert current Pigsty support for that historical or beta release.

| Template | Effective value | Versus upstream boot | Source expression |
| --- | --- | --- | --- |
| OLTP | `UTC` | different | `'UTC'` |
| OLAP | `UTC` | different | `'UTC'` |
| CRIT | `UTC` | different | `'UTC'` |
| TINY | `UTC` | different | `'UTC'` |
{.full-width}

> [!CAUTION]
> **Advice — pending human review.** Fact from the current Pigsty template projection: OLTP: PG9.0–19 Beta 3 = UTC (dcs); OLAP: PG9.0–19 Beta 3 = UTC (dcs); CRIT: PG9.0–19 Beta 3 = UTC (dcs); TINY: PG9.0–19 Beta 3 = UTC (dcs). Advice, pending human review — Editorial inference: UTC makes timestamps comparable across hosts, regions, failovers, and centralized log systems.

## Common pitfalls {#common-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.

## Related parameters {#related-parameters}

[`DateStyle`](/parameters/datestyle/) · [`IntervalStyle`](/parameters/intervalstyle/) · [`TimeZone`](/parameters/timezone/) · [`lc_time`](/parameters/lc-time/) · [`timezone_abbreviations`](/parameters/timezone-abbreviations/)

## References {#references}

- [PostgreSQL 19 Beta 3 — log_timezone](https://www.postgresql.org/docs/19/runtime-config-logging.html#GUC-LOG-TIMEZONE)
- [PostgreSQL 19 release notes](https://www.postgresql.org/docs/19/release-19.html)
- [Machine-readable GUC export](/data/guc.jsonl)
