wal_block_size
Read PG 18 manual ↗Reports the size of a WAL disk block.
- Type
- integer
- Context
- internal
- Measured default
- 8192
- Unit
- —
- Metadata snapshot
- 18
Definition PG 18 manual
Reports the size of a WAL disk block. It is determined by the value of XLOG_BLCKSZ when building the server. The default value is 8192 bytes.
Measured default history
| Version interval | Default |
|---|---|
| 9.0 – 19 | 8192 |
Authored guidance from the GUC source snapshot; the version-specific manual above is the definition reference. View source ↗
How it works
Shows the block size in the write ahead log. It is read-only and cannot be changed with SET or configuration-file edits.
It reflects XLOG_BLCKSZ, normally 8 KiB, chosen at build time and used for WAL I/O buffers.
Interpret it with block_size, wal_segment_size, segment_size. Applications and operations tooling may read wal_block_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_block_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_block_size to verify format, build, or resource assumptions on analytical nodes and keep every read/write candidate compatible.
OLTP: Not tunable. Record wal_block_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.
Related entries
Further reading
Definition snapshot: english-manuals:3f2409a374f16b5c6b5c651b184… · English manual source