til icon indicating copy to clipboard operation
til copied to clipboard

wal_compression

Open xluffy opened this issue 11 months ago • 0 comments

wal_compression (enum)

This parameter enables compression of WAL using the specified compression method. When enabled, the PostgreSQL server compresses full page images written to WAL when full_page_writes is on or during a base backup. A compressed page image will be decompressed during WAL replay. The supported methods are pglz, lz4 (if PostgreSQL was compiled with --with-lz4) and zstd (if PostgreSQL was compiled with --with-zstd). The default value is off. Only superusers and users with the appropriate SET privilege can change this setting.

Enabling compression can reduce the WAL volume without increasing the risk of unrecoverable data corruption, but at the cost of some extra CPU spent on the compression during WAL logging and on the decompression during WAL replay.

Note: The pglz, lz4, and zstd values are supported only for PostgreSQL versions 15 and later.

xluffy avatar Mar 01 '24 07:03 xluffy