wal-compression · shipping · also wal_compression, PostgreSQL WAL image compression

WAL compression

PostgreSQL WAL compression optionally compresses full-page images within its write-ahead log.

The setting targets page images, not all WAL records or archived segment files. PostgreSQL 18 supports pglz, plus lz4 and zstd when compiled with the corresponding libraries. Replay decompresses the images. [1]

The REL_18_0 builder can omit an unused page hole and uses compression only when the encoded representation saves space. An image count is therefore not a byte count. [2]

Relations

related
full-page-write, write-ahead-log, database-checkpoint

Limitations

Citations

  1. PostgreSQL 18: WAL settings, hint logging and image compression (accessed 2026-10-16)
  2. PostgreSQL REL_18_0: xloginsert.c, page holes and XLogCompressBackupBlock (accessed 2026-10-16)

Further reading

  1. Hesela: WAL page images, hint-bit changes and measurement boundaries (accessed 2026-10-16)
Sources & caveats

JSON: /data/terms/wal-compression.json