postgresql/src/backend
Michael Paquier 4035cd5d4e 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/3037310D-ECB7-4BF1-AF20-01C10BB33A33@yandex-team.ru
2021-06-29 11:17:55 +09:00
..
access Add support for LZ4 with compression of full-page writes in WAL 2021-06-29 11:17:55 +09:00
bootstrap Rethink definition of pg_attribute.attcompression. 2021-05-27 13:24:27 -04:00
catalog Pre branch pgindent / pgperltidy run 2021-06-28 11:05:54 -04:00
commands Message style improvements 2021-06-28 08:36:44 +02:00
executor Pre branch pgindent / pgperltidy run 2021-06-28 11:05:54 -04:00
foreign Update copyright for 2021 2021-01-02 13:06:25 -05:00
jit Prepare for forthcoming LLVM 13 API change. 2021-06-25 11:28:20 +12:00
lib Fix typo in comment 2021-04-20 14:35:16 +02:00
libpq Don't assume GSSAPI result strings are null-terminated. 2021-06-23 14:01:32 -04:00
main Update copyright for 2021 2021-01-02 13:06:25 -05:00
nodes Reconsider the handling of procedure OUT parameters. 2021-06-10 17:11:36 -04:00
optimizer Reconsider the handling of procedure OUT parameters. 2021-06-10 17:11:36 -04:00
parser Fix assert failure in expand_grouping_sets 2021-06-21 23:11:23 +12:00
partitioning Initial pgindent and pgperltidy run for v14. 2021-05-12 13:14:10 -04:00
po Translation updates 2021-06-21 12:33:50 +02:00
port Initial pgindent and pgperltidy run for v14. 2021-05-12 13:14:10 -04:00
postmaster Message style improvements 2021-06-28 08:36:44 +02:00
regex Fix performance issue in new regex match-all detection code. 2021-05-03 11:42:31 -04:00
replication Don't ERROR on PreallocXlogFiles() race condition. 2021-06-28 18:34:56 -07:00
rewrite Adjust locations which have an incorrect copyright year 2021-06-04 12:19:50 +12:00
snowball Update snowball 2021-02-19 08:10:15 +01:00
statistics Error message refactoring 2021-06-27 09:41:16 +02:00
storage Pre branch pgindent / pgperltidy run 2021-06-28 11:05:54 -04:00
tcop Message style improvements 2021-06-28 08:36:44 +02:00
tsearch Fix typos and grammar in comments and docs 2021-04-19 11:32:30 +09:00
utils Add support for LZ4 with compression of full-page writes in WAL 2021-06-29 11:17:55 +09:00
.gitignore Add .gitignore entries for AIX-specific intermediate build artifacts. 2015-07-08 20:44:22 -04:00
Makefile Use sort_template.h for qsort_tuple() and qsort_ssup(). 2021-03-03 17:02:32 +13:00
common.mk Remove PARTIAL_LINKING build mode. 2018-03-30 17:33:04 -07:00
nls.mk Translation updates 2021-05-10 14:36:21 +02:00