Teach pg_receivewal to use lz4 compression
gkokolatos@pm.me
From: gkokolatos@pm.me
To: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2021-06-29T14:45:17Z
Lists: pgsql-hackers
Attachments
- v1-0001-Teach-pg_receivewal-to-use-lz4-compression.patch (application/octet-stream) patch v1-0001
Hi, The program pg_receivewal can use gzip compression to store the received WAL. This patch teaches it to be able to use lz4 compression if the binary is build using the -llz4 flag. Previously, the user had to use the option --compress with a value between [0-9] to denote that gzip compression was requested. This specific behaviour is maintained. A newly introduced option --compress-program=lz4 can be used to ask for the logs to be compressed using lz4 instead. In that case, no compression values can be selected as it does not seem too useful. Under the hood there is nothing exceptional to be noted. Tar based archives have not yet been taught to use lz4 compression. Those are used by pg_basebackup. If is is felt useful, then it is easy to be added in a new patch. Cheers, //Georgios
Commits
-
Fix header inclusion order in pg_receivewal.c
- f512efb2d50a 15.0 landed
-
Remove useless LZ4 system call on failure when writing file header
- f79962d8264b 15.0 landed
-
Add support for LZ4 compression in pg_receivewal
- babbbb595d23 15.0 landed
-
Rework compression options of pg_receivewal
- d62bcc8b07f9 15.0 landed
-
Clarify some errors in pg_receivewal when closing WAL segments
- cddcf7842c31 15.0 landed