pgsql: pg_verifybackup: Enable WAL parsing for tar-format backups

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: pg_verifybackup: Enable WAL parsing for tar-format backups
Date: 2026-03-20 19:32:10
Message-ID: E1w3fZp-000gje-31@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

pg_verifybackup: Enable WAL parsing for tar-format backups

Now that pg_waldump supports reading WAL from tar archives, remove the
restriction that forced --no-parse-wal for tar-format backups.

pg_verifybackup now automatically locates the WAL archive: it looks for
a separate pg_wal.tar first, then falls back to the main base.tar. A
new --wal-path option (replacing the old --wal-directory, which is kept
as a silent alias) accepts either a directory or a tar archive path.

The default WAL directory preparation is deferred until the backup
format is known, since tar-format backups resolve the WAL path
differently from plain-format ones.

Author: Amul Sul <sulamul(at)gmail(dot)com>
Reviewed-by: Robert Haas <robertmhaas(at)gmail(dot)com>
Reviewed-by: Jakub Wartak <jakub(dot)wartak(at)enterprisedb(dot)com>
Reviewed-by: Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com>
Reviewed-by: Euler Taveira <euler(at)eulerto(dot)com>
Reviewed-by: Andrew Dunstan <andrew(at)dunslane(dot)net>
discussion: https://postgr.es/m/CAAJ_b94bqdWN3h2J-PzzzQ2Npbwct5ZQHggn_QoYGhC2rn-=WQ@mail.gmail.com

Branch
------
master

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

Modified Files
--------------
doc/src/sgml/ref/pg_verifybackup.sgml | 14 ++--
src/bin/pg_verifybackup/pg_verifybackup.c | 96 ++++++++++++++++++---------
src/bin/pg_verifybackup/t/002_algorithm.pl | 4 --
src/bin/pg_verifybackup/t/003_corruption.pl | 4 +-
src/bin/pg_verifybackup/t/007_wal.pl | 20 +++++-
src/bin/pg_verifybackup/t/008_untar.pl | 5 +-
src/bin/pg_verifybackup/t/010_client_untar.pl | 5 +-
7 files changed, 91 insertions(+), 57 deletions(-)

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Jeff Davis 2026-03-20 19:44:54 pgsql: Fix dependency on FDW's connection function.
Previous Message Nathan Bossart 2026-03-20 19:16:30 pgsql: Bump transaction/multixact ID warning limits to 100M.