From: Fujii Masao <fujii@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: pg_basebackup: Report correct size estimate for incremental back
Date: Wed, 14 Oct 2026 10:57:53 +0000
Message-ID: <E1xGwgD-00000001aEF-0LKA@gemulon.postgresql.org> (raw)
pg_basebackup: Report correct size estimate for incremental backups
Progress reporting in pg_basebackup and pg_stat_progress_basebackup used
the estimated size of a full backup even when taking an incremental backup.
The size estimation pass did not account for incremental files and counted
every file at its full size. Progress could therefore remain at only a few
percent even after the incremental backup completed successfully.
Fix this by making the size estimation pass account for incremental files,
counting them at the size they will occupy in the archive.
Backpatch to 17, where incremental backup was introduced.
Author: Daria Lepikhova <daria.n.lepikhova@gmail.com>
Reviewed-by: Manuel Reyes Bravo <manuelreyesbravo@gmail.com>
Reviewed-by: Zsolt Parragi <zsolt.parragi@percona.com>
Reviewed-by: Surya Poondla <suryapoondla4@gmail.com>
Reviewed-by: Fujii Masao <masao.fujii@gmail.com>
Discussion: https://postgr.es/m/CAK49S1ASwk7L-7LYUUz1MU_+uQnZ75srva2XRR4r-w0HCVZeUQ@mail.gmail.com
Backpatch-through: 17
Branch
------
REL_18_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/f47c63d7a453d7607ceabe74856c2d60669bfe7a
Modified Files
--------------
doc/src/sgml/protocol.sgml | 9 ++-
src/backend/backup/basebackup.c | 7 +-
src/backend/backup/basebackup_incremental.c | 4 +
src/bin/pg_basebackup/meson.build | 1 +
.../pg_basebackup/t/012_incremental_progress.pl | 85 ++++++++++++++++++++++
5 files changed, 102 insertions(+), 4 deletions(-)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: fujii@postgresql.org
Subject: Re: pgsql: pg_basebackup: Report correct size estimate for incremental back
In-Reply-To: <E1xGwgD-00000001aEF-0LKA@gemulon.postgresql.org>
References: <E1xGwgD-00000001aEF-0LKA@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
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