postgresql/src/bin
Michael Paquier 1d084fba1b Add ./configure check for "lz4" command
Some environments may compile with --with-lz4 while the command "lz4"
goes missing, causing two failures in the TAP tests of pg_verifybackup
(008_untar.pl and 010_client_untar.pl) as the code assumed that the
command always existed with a hardcoded value in src/Makefile.global.
Rather than this method, this adds a ./configure check based on
PGAC_PATH_PROGS() to find automatically the command and get an absolute
path to it.

Both tests need to be adjusted for the case where the command does not
exist, actually, as Makefile.global would set now LZ4 to an empty value
in this case.  The TAP tests of pg_receivewal already do that.

Per report from buildfarm member copperhead, as an effect of dab2984.
The origin of the failure is actually babbbb5 that did not centralize
the check for the existence of a "lz4" command at ./configure to shave a
few cycles.  Note that one just needs to tweak an environment to move
"lz4" out of the way to reproduce the problem, which is what I did to
test this change.

Per discussion with Robert Haas, Tom Lane, Andres Freund and myself.

Discussion: https://postgr.es/m/Ygc51WVAFGocSu4h@paquier.xyz
2022-02-14 10:40:34 +09:00
..
initdb Replace Test::More plans with done_testing 2022-02-11 20:54:44 +01:00
pg_amcheck Replace Test::More plans with done_testing 2022-02-11 20:54:44 +01:00
pg_archivecleanup Replace Test::More plans with done_testing 2022-02-11 20:54:44 +01:00
pg_basebackup Replace Test::More plans with done_testing 2022-02-11 20:54:44 +01:00
pg_checksums Replace Test::More plans with done_testing 2022-02-11 20:54:44 +01:00
pg_config Replace Test::More plans with done_testing 2022-02-11 20:54:44 +01:00
pg_controldata Replace Test::More plans with done_testing 2022-02-11 20:54:44 +01:00
pg_ctl Replace Test::More plans with done_testing 2022-02-11 20:54:44 +01:00
pg_dump Replace Test::More plans with done_testing 2022-02-11 20:54:44 +01:00
pg_resetwal Replace Test::More plans with done_testing 2022-02-11 20:54:44 +01:00
pg_rewind Silence minor compiler warnings. 2022-02-13 13:06:55 -05:00
pg_test_fsync Replace Test::More plans with done_testing 2022-02-11 20:54:44 +01:00
pg_test_timing Replace Test::More plans with done_testing 2022-02-11 20:54:44 +01:00
pg_upgrade Add (void) cast in front of rmtree() call at the end of pg_upgrade 2022-02-07 14:19:52 +09:00
pg_verifybackup Add ./configure check for "lz4" command 2022-02-14 10:40:34 +09:00
pg_waldump Replace Test::More plans with done_testing 2022-02-11 20:54:44 +01:00
pgbench Update copyright for 2022 2022-01-07 19:04:57 -05:00
pgevent Update copyright for 2022 2022-01-07 19:04:57 -05:00
psql Replace Test::More plans with done_testing 2022-02-11 20:54:44 +01:00
scripts Replace Test::More plans with done_testing 2022-02-11 20:54:44 +01:00
Makefile Update copyright for 2022 2022-01-07 19:04:57 -05:00