RE: Fix pg_checksums progress report
shinya11.kato@nttdata.com
From: <Shinya11.Kato@nttdata.com>
To: <masao.fujii@oss.nttdata.com>, <michael@paquier.xyz>
Cc: <pgsql-hackers@postgresql.org>
Date: 2021-04-02T09:19:32Z
Lists: pgsql-hackers
Attachments
- fix_pg_checksums_progress_report_v3.patch (application/octet-stream) patch v3
>-----Original Message----- >From: Fujii Masao <masao.fujii@oss.nttdata.com> >Sent: Friday, April 2, 2021 6:03 PM >To: Michael Paquier <michael@paquier.xyz>; Shinya11.Kato@nttdata.com >Cc: pgsql-hackers@postgresql.org >Subject: Re: Fix pg_checksums progress report > > > >On 2021/04/02 16:47, Michael Paquier wrote: >> On Fri, Apr 02, 2021 at 07:30:32AM +0000, Shinya11.Kato@nttdata.com wrote: >>> I added a comment to the patch, and attached the new patch. > >Thanks for updating the patch! > >+ /* >+ * The current_size is calculated before checking if header is a >+ * new page, because total_size includes the size of new >pages. >+ */ >+ current_size += r; > >I'd like to comment more. What about the following? > >--------------------------- >Since the file size is counted as total_size for progress status information, the >sizes of all pages including new ones in the file should be counted as >current_size. Otherwise the progress reporting calculated using those counters >may not reach 100%. >--------------------------- Thanks for your review! I updated the patch, and attached it. Regards, Shinya Kato
Commits
-
pg_checksums: Fix progress reporting.
- 24bcce3bd6b4 12.7 landed
- 104164361cb1 13.3 landed
- 2eb1fc8b1ae8 14.0 landed