pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Handle concatenated gzip members in astreamer decompressor
2+ messages / 1 participants
[nested] [flat]

* pgsql: Handle concatenated gzip members in astreamer decompressor
@ 2026-10-08 19:59 Daniel Gustafsson <dgustafsson@postgresql.org>
  0 siblings, 0 replies; 2+ messages in thread

From: Daniel Gustafsson @ 2026-10-08 19:59 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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 <zhong950419@gmail.com>
Reviewed-by: Daniel Gustafsson <daniel@yesql.se>
Reviewed-by: Chao Li <li.evan.chao@gmail.com>
Reviewed-by: Andrew Dunstan <andrew@dunslane.net>
Discussion: https://postgr.es/m/CAGRkXqTcyuog_MzKqQm+am2xMefLFJTSKaRevnfypDWirCFvdA@mail.gmail.com
Backpatch-through: 19

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/f884f359f5acb29bd423001b4878b85f51406b42

Modified Files
--------------
src/bin/pg_verifybackup/t/007_wal.pl | 22 ++++++++++++++++++++++
src/fe_utils/astreamer_gzip.c        |  8 ++++++++
2 files changed, 30 insertions(+)



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* pgsql: Handle concatenated gzip members in astreamer decompressor
@ 2026-10-08 19:59 Daniel Gustafsson <dgustafsson@postgresql.org>
  0 siblings, 0 replies; 2+ messages in thread

From: Daniel Gustafsson @ 2026-10-08 19:59 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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 <zhong950419@gmail.com>
Reviewed-by: Daniel Gustafsson <daniel@yesql.se>
Reviewed-by: Chao Li <li.evan.chao@gmail.com>
Reviewed-by: Andrew Dunstan <andrew@dunslane.net>
Discussion: https://postgr.es/m/CAGRkXqTcyuog_MzKqQm+am2xMefLFJTSKaRevnfypDWirCFvdA@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(+)



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2026-10-08 19:59 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2026-10-08 19:59 pgsql: Handle concatenated gzip members in astreamer decompressor Daniel Gustafsson <dgustafsson@postgresql.org>
2026-10-08 19:59 pgsql: Handle concatenated gzip members in astreamer decompressor Daniel Gustafsson <dgustafsson@postgresql.org>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox