Skip to content

wal_level

wal_level — Sets the level of information written to the WAL. Observed in PG9.0–19 Beta 3; its last measured boot default is replica in PG19 Beta 3, with postmaster context. This is a beta-snapshot fact and can change before PostgreSQL 19 GA.
Note

Fact — official short description: “Sets the level of information written to the WAL.”

Identity

Type , Valueenum
Upstream pg_settings type
Context , Valuepostmaster
Requires a server restart
Unit , Value
Raw unit
Range , Value
Raw limits in the last observed version
Enum values , Valueminimal, replica, logical
— for non-enum types
Category , ValueWrite-Ahead Log / Settings
Upstream classification
Latest boot value , Valuereplica
replica

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

Measured PG9.0–19 Beta 3 boot defaults
Versions Raw boot_val Unit Human value
PG9.0–9.6 minimal minimal
PG10–19 Beta 3 replica replica

How it works

Sets the level of information written to the WAL. The value is fixed when the server starts, so changing it requires a restart.

minimal logs only crash-recovery needs and is incompatible with archiving/streaming modes that require replica data; replica supports physical replication and archive recovery; logical adds logical-decoding information. Changing level requires restart and may change WAL volume.

Monitor and change wal_level together with wal_compression, full_page_writes, wal_log_hints. Validate on the relevant server role and real workload, then use its postmaster context to choose session change, reload, or restart; a historical boot default is not the current effective value.

Tuning advice

Tip

Advice. These are workload-specific starting points and must be validated with measurements.

Workload Guidance
OLTP Establish durability and recovery objectives first, then tune wal_level from WAL rate, flush latency, checkpoints, and peak pg_wal usage. Validate every change with crash/recovery and archive monitoring.
OLAP Provision WAL, archive bandwidth, and recovery I/O for bulk-load peaks. Coordinate load pacing and checkpoints when reducing spikes; never break the recovery chain for throughput.
Small nodes Start from safe defaults or the measured Pigsty value and set explicit alerts for limited disk capacity. Do not disable durability or break the recovery chain merely to save modest I/O.

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 logical different logical
OLAP logical different logical
CRIT logical different logical
TINY logical different logical
Caution

Advice — pending human review. Fact from the current Pigsty template projection: OLTP: PG9.0–19 Beta 3 = logical (dcs); OLAP: PG9.0–19 Beta 3 = logical (dcs); CRIT: PG9.0–19 Beta 3 = logical (dcs); TINY: PG9.0–19 Beta 3 = logical (dcs). Advice, pending human review — Editorial interpretation, pending human maintainer review: the override appears intended to enable logical decoding by default across Pigsty profiles; confirm it against the current Pigsty templates, hardware fixture, and operational guarantees before publication.

Common pitfalls

  • Selecting minimal while expecting archiving, streaming replication, or logical decoding.
  • Raising it without budgeting extra WAL and restart downtime.
  • Lowering it while slots/subscriptions still depend on the higher level.
  • Confusing pg_settings base units with human-readable configuration units.
  • Benchmarking throughput without a crash-recovery and archive-restore test.

wal_compression · full_page_writes · wal_log_hints · wal_buffers · max_wal_senders · max_replication_slots

References