Introduce pg_receivewal gzip compression tests

Georgios <gkokolatos@protonmail.com>

From: Georgios <gkokolatos@protonmail.com>
To: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>, Michael Paquier <michael@paquier.xyz>
Date: 2021-07-09T11:26:58Z
Lists: pgsql-hackers

Attachments

Hi,

As suggested on a different thread [1], pg_receivewal can increase it's test
coverage. There exists a non trivial amount of code that handles gzip
compression. The current patch introduces tests that cover creation of gzip
compressed WAL files and the handling of gzip partial segments. Finally the
integrity of the compressed files is verified.

I hope you find this useful.

Cheers,
//Georgios

[1] https://www.postgresql.org/message-id/flat/ZCm1J5vfyQ2E6dYvXz8si39HQ2gwxSZ3IpYaVgYa3lUwY88SLapx9EEnOf5uEwrddhx2twG7zYKjVeuP5MwZXCNPybtsGouDsAD1o2L_I5E%3D%40pm.me

Commits

  1. Re-enable TAP tests of pg_receivewal for ZLIB on Windows

  2. Fix some issues with WAL segment opening for pg_receivewal --compress

  3. Disable tests involving ZLIB on Windows for pg_receivewal

  4. Fix portability issue with gzip in TAP test of pg_receivewal

  5. Add TAP tests for ZLIB compression for pg_receivewal