pgsql: Handle compression level in pg_receivewal for LZ4

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Handle compression level in pg_receivewal for LZ4
Date: 2022-04-18 01:19:21
Message-ID: E1ngG2z-0010Ou-M6@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Handle compression level in pg_receivewal for LZ4

The new option set of pg_receivewal introduced in 042a923 to control the
compression method makes it now easy to pass down various options,
including the compression level. The change to be able to do is simple,
and requires one LZ4F_preferences_t fed to LZ4F_compressBegin().

Note that LZ4F_INIT_PREFERENCES could be used to initialize the contents
of LZ4F_preferences_t as required by LZ4, but this is only available
since v1.8.3. memset()'ing its structure to 0 is enough.

Discussion: https://postgr.es/m/YlPQGNAAa04raObK@paquier.xyz

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/42e44f3b3830cbc051a5d83956546e2ef553b047

Modified Files
--------------
src/bin/pg_basebackup/walmethods.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Michael Paquier 2022-04-18 02:41:08 pgsql: Fix race in TAP test 002_archiving.pl when restoring history fil
Previous Message Michael Paquier 2022-04-17 23:49:17 Re: pgsql: Add TAP test for archive_cleanup_command and recovery_end_comman