lz4 --rm on Ubuntu 18.04 (Add LZ4 compression to pg_dump) - Mailing list pgsql-hackers

From Christoph Berg
Subject lz4 --rm on Ubuntu 18.04 (Add LZ4 compression to pg_dump)
Date
Msg-id ZAjL96N9ZW84U59p@msg.df7cb.de
Whole thread Raw
Responses Re: lz4 --rm on Ubuntu 18.04 (Add LZ4 compression to pg_dump)  (Daniel Gustafsson <daniel@yesql.se>)
List pgsql-hackers
Re: Tomas Vondra
> Add LZ4 compression to pg_dump

This broke the TAP tests on Ubuntu 18.04 (bionic):

[17:06:45.513](0.000s) ok 1927 - compression_lz4_custom: should not dump test_table with 4-row INSERTs
# Running: pg_dump --jobs=2 --format=directory --compress=lz4:1
--file=/home/myon/projects/postgresql/pg/master/build/src/bin/pg_dump/tmp_check/tmp_test__aAO/compression_lz4_dir
postgres
[17:06:46.651](1.137s) ok 1928 - compression_lz4_dir: pg_dump runs
# Running: /usr/bin/lz4 -z -f --rm
/home/myon/projects/postgresql/pg/master/build/src/bin/pg_dump/tmp_check/tmp_test__aAO/compression_lz4_dir/blobs.toc
/home/myon/projects/postgresql/pg/master/build/src/bin/pg_dump/tmp_check/tmp_test__aAO/compression_lz4_dir/blobs.toc.lz4
Incorrect parameters
Usage :
      /usr/bin/lz4 [arg] [input] [output]

input   : a filename
          with no FILE, or when FILE is - or stdin, read standard input
Arguments :
 -1     : Fast compression (default) 
 -9     : High compression 
 -d     : decompression (default for .lz4 extension)
 -z     : force compression
 -f     : overwrite output without prompting 
 -h/-H  : display help/long help and exit
[17:06:46.667](0.016s) not ok 1929 - compression_lz4_dir: compression commands
[17:06:46.668](0.001s) 
[17:06:46.668](0.001s) #   Failed test 'compression_lz4_dir: compression commands'
[17:06:46.669](0.000s) #   at t/002_pg_dump.pl line 4274.
[17:06:46.670](0.001s) ok 1930 - compression_lz4_dir: glob check for
/home/myon/projects/postgresql/pg/master/build/src/bin/pg_dump/tmp_check/tmp_test__aAO/compression_lz4_dir/toc.dat

The lz4 binary there doesn't have the --rm option yet.

liblz4-tool                      0.0~r131-2ubuntu3

--rm appears in a single place only:

                 # Give coverage for manually compressed blob.toc files during
                 # restore.
                 compress_cmd => {
                         program => $ENV{'LZ4'},
                         args    => [
                                 '-z', '-f', '--rm',
                                 "$tempdir/compression_lz4_dir/blobs.toc",
                                 "$tempdir/compression_lz4_dir/blobs.toc.lz4",
                         ],
                 },

18.04 will be EOL in a few weeks so it might be ok to just say it's
not supported, but removing the input file manually after calling lz4
would be an easy fix.

Christoph



pgsql-hackers by date:

Previous
From: Jeff Davis
Date:
Subject: Re: allow meson to find ICU in non-standard localtion
Next
From: Antonin Houska
Date:
Subject: Re: Parallelize correlated subqueries that execute within each worker