| From: | Fujii Masao <fujii(at)postgresql(dot)org> |
|---|---|
| To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
| Subject: | pgsql: pg_basebackup: Report correct size estimate for incremental back |
| Date: | 2026-10-14 10:57:53 |
| Message-ID: | E1xGwgD-00000001aEF-0LKA@gemulon.postgresql.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-committers |
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(dot)n(dot)lepikhova(at)gmail(dot)com>
Reviewed-by: Manuel Reyes Bravo <manuelreyesbravo(at)gmail(dot)com>
Reviewed-by: Zsolt Parragi <zsolt(dot)parragi(at)percona(dot)com>
Reviewed-by: Surya Poondla <suryapoondla4(at)gmail(dot)com>
Reviewed-by: Fujii Masao <masao(dot)fujii(at)gmail(dot)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(-)
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Fujii Masao | 2026-10-14 10:58:02 | pgsql: doc: Clarify that base backup progress counts uncompressed archi |
| Previous Message | Fujii Masao | 2026-10-14 10:57:41 | pgsql: doc: Clarify that base backup progress counts uncompressed archi |