Handle concatenated gzip members in astreamer decompressor With WAL streaming, pg_basebackup -Ft -z writes pg_wal.tar.gz as a series of gzip members. The decompressor did not reset the inflate state when one ended, so inflate consumed nothing more and the loop never finished. This caused pg_waldump to hang on such backups and as a consequence pg_verifybackup (which use pg_waldump) would hang.
A test is added to pg_verifybackup for checking a gzip-compressed tar backup, which in turn will verify that pg_waldump works. Author: Shihao Zhong <[email protected]> Reviewed-by: Daniel Gustafsson <[email protected]> Reviewed-by: Chao Li <[email protected]> Reviewed-by: Andrew Dunstan <[email protected]> Discussion: https://postgr.es/m/cagrkxqtcyuog_mzkqqm+am2xmeflfjtskarevnfypdwircf...@mail.gmail.com Backpatch-through: 19 Branch ------ REL_19_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/39c2969eb0e504d20ab9fd418775d36f1ff3045b Modified Files -------------- src/bin/pg_verifybackup/t/007_wal.pl | 22 ++++++++++++++++++++++ src/fe_utils/astreamer_gzip.c | 8 ++++++++ 2 files changed, 30 insertions(+)
