1
0
mirror of https://github.com/pgbackrest/pgbackrest.git synced 2025-11-06 08:49:29 +02:00

Use original file size to log size changes during backup.

c9703b35 added logging for file size changes during backup. Later 5ed6f8df added the sizeOriginal member to ManifestFile, which arguably is better to use for logging rather than size before backup since it will always contain the original size. Size could in theory be modified for deduplication purposes.

Update logging to use sizeOriginal.
This commit is contained in:
David Steele
2023-12-17 13:15:03 -03:00
parent bb6e5164ee
commit 8af3c1c9ac

View File

@@ -1443,8 +1443,8 @@ backupJobResult(
strCatFmt(logProgress, "bundle %" PRIu64 "/%" PRIu64 ", ", bundleId, bundleOffset);
// Log original manifest size if copy size differs
if (copySize != file.size)
strCatFmt(logProgress, "%s->", strZ(strSizeFormat(file.size)));
if (copySize != file.sizeOriginal)
strCatFmt(logProgress, "%s->", strZ(strSizeFormat(file.sizeOriginal)));
// Store percentComplete as an integer
percentComplete = sizeTotal == 0 ? 10000 : (unsigned int)(((double)*sizeProgress / (double)sizeTotal) * 10000);