wal_segment_size
Read PG 18 manual ↗Reports the size of write ahead log segments.
- Type
- integer
- Context
- internal
- Measured default
- 16 MiB
- Unit
- B
- Metadata snapshot
- 18
Definition PG 18 manual
Reports the size of write ahead log segments. The default value is 16MB. See Section 28.5 for more information.
Measured default history
| Version interval | Default |
|---|---|
| 9.0 – 10 | 16 MiB (2048 × 8kB) |
| 11 – 19 | 16 MiB |
Authored guidance from the GUC source snapshot; the version-specific manual above is the definition reference. View source ↗
How it works
Shows the size of write ahead log segments. It is read-only and cannot be changed with SET or configuration-file edits.
It reports the WAL segment size. PostgreSQL 11 and later choose it at initdb time; older clusters normally inherit the build-time value.
Interpret it with min_wal_size, max_wal_size, wal_keep_size. Applications and operations tooling may read wal_segment_size for capability or environment detection, but cannot SET it; cross-cluster comparisons must account for build, initdb, and current-database differences.
Operational considerations
Trying to change read-only wal_segment_size with SET or a configuration file.
Assuming every cluster, database, or vendor build reports the same value.
Ignoring the value in file-format or feature-compatibility checks.
Treating reported metadata as a performance target instead of an environment fact.
Workload guidance
OLAP: Not tunable. Use wal_segment_size to verify format, build, or resource assumptions on analytical nodes and keep every read/write candidate compatible.
OLTP: Not tunable. Record wal_segment_size as a deployment/capability fact; if it is unexpected, fix the binary, initdb, or database-creation process rather than trying SET.
SMALL: Not tunable. Preserve it in inventory and incident reports; do not custom-build or rebuild merely to change it without a demonstrated compatibility need.
Version history 5
- PG 16 → 17changed
- PG 13 → 14changed
- PG 11 → 12changed
- PG 10 → 11changed
- PG 9.5 → 9.6changed
Related entries
Further reading
Definition snapshot: english-manuals:659e97a9d7c75f300f5c2f6fdb8… · English manual source