Teach pg_receivewal to use lz4 compression

From: gkokolatos(at)pm(dot)me
To: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Teach pg_receivewal to use lz4 compression
Date: 2021-06-29 14:45:17
Message-ID: ZCm1J5vfyQ2E6dYvXz8si39HQ2gwxSZ3IpYaVgYa3lUwY88SLapx9EEnOf5uEwrddhx2twG7zYKjVeuP5MwZXCNPybtsGouDsAD1o2L_I5E=@pm.me
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers


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.


Attachment Content-Type Size
v1-0001-Teach-pg_receivewal-to-use-lz4-compression.patch application/octet-stream 16.7 KB


Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2021-06-29 15:03:57 Re: Pipeline mode and PQpipelineSync()
Previous Message Ronan Dunklau 2021-06-29 14:40:57 Re: Using each rel as both outer and inner for JOIN_ANTI