summaryrefslogtreecommitdiff
path: root/src/backend/utils/misc/postgresql.conf.sample
diff options
context:
space:
mode:
authorMichael Paquier2021-06-29 02:17:55 +0000
committerMichael Paquier2021-06-29 02:17:55 +0000
commit4035cd5d4eee4dae797bfc77ab07f8dcd8781b41 (patch)
tree6f002f0b1f66bd5e6897ad399508060d77b1b874 /src/backend/utils/misc/postgresql.conf.sample
parentcc2c7d65fc27e877c9f407587b0b92d46cd6dd16 (diff)
Add support for LZ4 with compression of full-page writes in WAL
The logic is implemented so as there can be a choice in the compression used when building a WAL record, and an extra per-record bit is used to track down if a block is compressed with PGLZ, LZ4 or nothing. wal_compression, the existing parameter, is changed to an enum with support for the following backward-compatible values: - "off", the default, to not use compression. - "pglz" or "on", to compress FPWs with PGLZ. - "lz4", the new mode, to compress FPWs with LZ4. Benchmarking has showed that LZ4 outclasses easily PGLZ. ZSTD would be also an interesting choice, but going just with LZ4 for now makes the patch minimalistic as toast compression is already able to use LZ4, so there is no need to worry about any build-related needs for this implementation. Author: Andrey Borodin, Justin Pryzby Reviewed-by: Dilip Kumar, Michael Paquier Discussion: https://postgr.es/m/[email protected]
Diffstat (limited to 'src/backend/utils/misc/postgresql.conf.sample')
-rw-r--r--src/backend/utils/misc/postgresql.conf.sample3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/backend/utils/misc/postgresql.conf.sample b/src/backend/utils/misc/postgresql.conf.sample
index af04ec3c744..b696abfe541 100644
--- a/src/backend/utils/misc/postgresql.conf.sample
+++ b/src/backend/utils/misc/postgresql.conf.sample
@@ -218,7 +218,8 @@
#full_page_writes = on # recover from partial page writes
#wal_log_hints = off # also do full page writes of non-critical updates
# (change requires restart)
-#wal_compression = off # enable compression of full-page writes
+#wal_compression = off # enables compression of full-page writes;
+ # off, pglz, lz4, or on
#wal_init_zero = on # zero-fill new WAL files
#wal_recycle = on # recycle WAL files
#wal_buffers = -1 # min 32kB, -1 sets based on shared_buffers