Re: Introduce pg_receivewal gzip compression tests
Michael Paquier <michael@paquier.xyz>
From: Michael Paquier <michael@paquier.xyz>
To: gkokolatos@pm.me
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2021-07-15T23:59:11Z
Lists: pgsql-hackers
On Thu, Jul 15, 2021 at 09:35:52PM +0900, Michael Paquier wrote: > For this one, I'll try to test harder on my own host. I am curious to > see if the other Windows members running the TAP tests have anything > to say. Looking at the code of zlib, this would come from gz_zero() > in gzflush(), which could blow up on a write() in gz_comp(). bowerbird has just failed for the second time in a row on EACCESS, so there is more here than meets the eye. Looking at the code, I think I have spotted what it is and the buildfarm logs give a very good hint: # Running: pg_receivewal -D :/prog/bf/root/HEAD/pgsql.build/src/bin/pg_basebackup/tmp_check/t_020_pg_receivewal_primary_data/archive_wal --verbose --endpos 0/3000028 --compress 1 pg_receivewal: starting log streaming at 0/2000000 (timeline 1) pg_receivewal: fatal: could not fsync existing write-ahead log file "000000010000000000000002.partial": Permission denied not ok 20 - streaming some WAL using ZLIB compression --compress is used and the sync fails for a non-compressed segment. Looking at the code it is pretty obvious that open_walfile() is getting confused with the handling of an existing .partial segment while walmethods.c uses dir_data->compression in all the places that matter. So that's a legit bug, that happens only when mixing pg_receivewal runs for where successive runs use the compression or non-compression modes. I am amazed that the other buildfarm members are not complaining, to be honest. jacana runs this TAP test with MinGW and ZLIB, and does not complain. -- Michael
Commits
-
Re-enable TAP tests of pg_receivewal for ZLIB on Windows
- 91d395f47aa9 15.0 landed
-
Fix some issues with WAL segment opening for pg_receivewal --compress
- 11dbad74c104 10.18 landed
- 795a9166e2e1 11.13 landed
- b9a0de15eb29 12.8 landed
- fb2b86015a9f 13.4 landed
- 3a0d2d0cbaf3 14.0 landed
- 7fbe0c8c4d4f 15.0 landed
-
Disable tests involving ZLIB on Windows for pg_receivewal
- 6cea447e6a10 15.0 landed
-
Fix portability issue with gzip in TAP test of pg_receivewal
- 0da3c1bc3f72 15.0 landed
-
Add TAP tests for ZLIB compression for pg_receivewal
- ffc9ddaea33f 15.0 landed