Обсуждение: pgsql: Add suport for server-side LZ4 base backup compression.

Поиск
Список
Период
Сортировка

pgsql: Add suport for server-side LZ4 base backup compression.

От
Robert Haas
Дата:
Add suport for server-side LZ4 base backup compression.

LZ4 compression can be a lot faster than gzip compression, so users
may prefer it even if the compression ratio is not as good. We will
want pg_basebackup to support LZ4 compression and decompression on the
client side as well, and there is a pending patch for that, but it's
by a different author, so I am committing this part separately for
that reason.

Jeevan Ladhe, reviewed by Tushar Ahuja and by me.

Discussion: http://postgr.es/m/CANm22Cg9cArXEaYgHVZhCnzPLfqXCZLAzjwTq7Fc0quXRPfbxA@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/dab298471ff2f91f33bc25bfb73e435d3ab02148

Modified Files
--------------
doc/src/sgml/protocol.sgml                |   7 +-
doc/src/sgml/ref/pg_basebackup.sgml       |  24 ++-
src/backend/replication/Makefile          |   1 +
src/backend/replication/basebackup.c      |   7 +-
src/backend/replication/basebackup_lz4.c  | 298 ++++++++++++++++++++++++++++++
src/bin/pg_basebackup/pg_basebackup.c     |  18 +-
src/bin/pg_verifybackup/Makefile          |   1 +
src/bin/pg_verifybackup/t/008_untar.pl    |  10 +-
src/include/replication/basebackup_sink.h |   1 +
9 files changed, 349 insertions(+), 18 deletions(-)


Re: pgsql: Add suport for server-side LZ4 base backup compression.

От
Michael Paquier
Дата:
On Fri, Feb 11, 2022 at 01:54:36PM +0000, Robert Haas wrote:
> Add suport for server-side LZ4 base backup compression.
>
> LZ4 compression can be a lot faster than gzip compression, so users
> may prefer it even if the compression ratio is not as good. We will
> want pg_basebackup to support LZ4 compression and decompression on the
> client side as well, and there is a pending patch for that, but it's
> by a different author, so I am committing this part separately for
> that reason.
>
> Jeevan Ladhe, reviewed by Tushar Ahuja and by me.

copperhead seems to be unhappy here:
https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=copperhead&dt=2022-02-11%2021%3A52%3A48
# Running: lz4 -d -m

/home/pgbf/buildroot/HEAD/pgsql.build/src/bin/pg_verifybackup/tmp_check/t_008_untar_primary_data/backup/server-backup/base.tar.lz4
Can't exec "lz4": No such file or directory at
/home/pgbf/buildroot/HEAD/pgsql.build/src/bin/pg_verifybackup/../../../src/test/perl/PostgreSQL/Test/Utils.pm
line 388.
Bail out!  failed to execute command "lz4 -d -m

/home/pgbf/buildroot/HEAD/pgsql.build/src/bin/pg_verifybackup/tmp_check/t_008_untar_primary_data/backup/server-backup/base.tar.lz4":
No such file or directory
### Stopping node "primary" using mode immediate

Perhaps you'd better check that 'decompress_program' can be executed
and skip things if the command is not around?  Note that
020_pg_receivewal.pl does an extra lz4 --version as a safety measure,
but 008_untar.pl does not.
--
Michael

Вложения