Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pZy0P-00041x-TZ for pgsql-hackers@arkaria.postgresql.org; Wed, 08 Mar 2023 17:55:13 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pZy0O-0003d9-JQ for pgsql-hackers@arkaria.postgresql.org; Wed, 08 Mar 2023 17:55:12 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pZy0O-0003ap-9n for pgsql-hackers@lists.postgresql.org; Wed, 08 Mar 2023 17:55:12 +0000 Received: from feynman.df7cb.de ([195.49.152.168]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pZy0J-0003II-2m for pgsql-hackers@lists.postgresql.org; Wed, 08 Mar 2023 17:55:11 +0000 Received: from msg.df7cb.de (unknown [IPv6:2a02:908:1482:3660:2ae7:2867:64d8:87dc]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature ECDSA (P-384) server-digest SHA384) (Client did not present a certificate) by feynman.df7cb.de (Postfix) with ESMTPSA id 4PX0MX2h6lz3F14; Wed, 8 Mar 2023 18:55:04 +0100 (CET) Date: Wed, 8 Mar 2023 18:55:03 +0100 From: Christoph Berg To: Tomas Vondra Cc: PostgreSQL Hackers Subject: lz4 --rm on Ubuntu 18.04 (Add LZ4 compression to pg_dump) Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk 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