RE: Fix pg_checksums progress report
shinya11.kato@nttdata.com
From: <Shinya11.Kato@nttdata.com>
To: <masao.fujii@oss.nttdata.com>, <pgsql-hackers@postgresql.org>
Date: 2021-04-02T07:30:32Z
Lists: pgsql-hackers
Attachments
- fix_pg_checksums_progress_report_v2.patch (application/octet-stream) patch v2
>-----Original Message----- >From: Fujii Masao <masao.fujii@oss.nttdata.com> >Sent: Friday, April 2, 2021 2:39 PM >To: Shinya11.Kato@nttdata.com; pgsql-hackers@postgresql.org >Subject: Re: Fix pg_checksums progress report > > > >On 2021/04/02 14:23, Shinya11.Kato@nttdata.com wrote: >> Hi, >> >> I found a problem with the pg_checksums.c. >> >> The total_size is calculated by scanning the directory. >> The current_size is calculated by scanning the files, but the current_size does >not include the size of NewPages. >> >> This may cause pg_checksums progress report to not be 100%. >> I have attached a patch that fixes this. > >Thanks for the report and patch! > >I could reproduce this issue and confirmed that the patch fixes it. > >Regarding the patch, I think that it's better to add the comment about why >current_size needs to be counted including new pages. Thanks for your review. I added a comment to the patch, and attached the new patch. Regards, Shinya Kato
Commits
-
pg_checksums: Fix progress reporting.
- 24bcce3bd6b4 12.7 landed
- 104164361cb1 13.3 landed
- 2eb1fc8b1ae8 14.0 landed