Re: Fix pg_checksums progress report

From: Fujii Masao <masao(dot)fujii(at)oss(dot)nttdata(dot)com>
To: Shinya11(dot)Kato(at)nttdata(dot)com, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Fix pg_checksums progress report
Date: 2021-04-02 05:39:20
Message-ID: 467161d1-7cf7-43f5-2b9f-d3ad57696882@oss.nttdata.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2021/04/02 14:23, Shinya11(dot)Kato(at)nttdata(dot)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.

Regards,

--
Fujii Masao
Advanced Computing Technology Center
Research and Development Headquarters
NTT DATA CORPORATION

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Kyotaro Horiguchi 2021-04-02 05:40:09 Re: libpq debug log
Previous Message Fabien COELHO 2021-04-02 05:38:57 Re: pgbench - add pseudo-random permutation function