pgsql: Fix portability issue with gzip in TAP test of pg_receivewal

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Fix portability issue with gzip in TAP test of pg_receivewal
Date: 2021-07-15 12:26:13
Message-ID: E1m40RR-0005lg-By@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Fix portability issue with gzip in TAP test of pg_receivewal

The OpenBSD implementation of gzip considers only files suffixed by "Z",
"gz", "z", "tgz" or "taz" as valid targets, discarding anything else and
making a command using --test exit with an error code of 512 if anything
invalid is found. The test introduced in ffc9dda tested a WAL segment
suffixed as .gz.partial, enough to make the test fail.

Testing only a full segment is fine enough in terms of coverage, so
simplify the code by discarding the .gz.partial segment in this check.
This should be enough to make the test pass with OpenBSD environments.

Per report from curculio.

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

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/0da3c1bc3f7261d5157f5b86ade88e8b379f8686

Modified Files
--------------
src/bin/pg_basebackup/t/020_pg_receivewal.pl | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2021-07-15 15:00:59 pgsql: Ensure HAVE_DECL_XXX macros in MSVC builds match those in Unix.
Previous Message Alexander Korotkov 2021-07-15 11:42:24 pgsql: Fix small inconsistencies in catalog definition of multirange op