fix_pg_checksums_progress_report.patch
application/octet-stream
Filename: fix_pg_checksums_progress_report.patch
Type: application/octet-stream
Part: 0
Message:
Fix pg_checksums progress report
Patch
Format: unified
| File | + | − |
|---|---|---|
| src/bin/pg_checksums/pg_checksums.c | 3 | 1 |
diff --git a/src/bin/pg_checksums/pg_checksums.c b/src/bin/pg_checksums/pg_checksums.c
index 0223ee4408..f3b4751e3f 100644
--- a/src/bin/pg_checksums/pg_checksums.c
+++ b/src/bin/pg_checksums/pg_checksums.c
@@ -229,12 +229,14 @@ scan_file(const char *fn, BlockNumber segmentno)
}
blocks++;
+ current_size += r;
+
/* New pages have no checksum yet */
if (PageIsNew(header))
continue;
csum = pg_checksum_page(buf.data, blockno + segmentno * RELSEG_SIZE);
- current_size += r;
+
if (mode == PG_MODE_CHECK)
{
if (csum != header->pd_checksum)