Re: Progress reporting for pg_verify_checksums

Michael Paquier <michael@paquier.xyz>

From: Michael Paquier <michael@paquier.xyz>
To: Fabien COELHO <coelho@cri.ensmp.fr>
Cc: Michael Banck <michael.banck@credativ.de>, Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>, alvherre@2ndquadrant.com, mailings@oopsware.de, thomas.munro@enterprisedb.com, pgsql-hackers@postgresql.org
Date: 2019-03-30T14:31:09Z
Lists: pgsql-hackers

Attachments

On Thu, Mar 28, 2019 at 03:53:59PM +0100, Fabien COELHO wrote:
> I think that it is good to show the overall impact of the signal stuff, in
> particular the fact that the size must always be computed if the progress
> may be activated.

Getting to know the total size and the current size are the two
important factors that matter when it comes to do progress reporting
in my opinion.  I have read the patch, and I am not really convinced
by the need to show the progress report based on an interval of 250ms
as we talk about an operation which could take dozens of minutes.  So
I have simplified the patch to only show a progress report every
second.  This also removes the include for the time-related APIs from 
portability/.  A second thing is that I don't think that the speed is 
much useful.  I would expect the speed to be steady, still there is a
risk to show incorrect information if the speed of the operation is
spiky or irregular leading to an incorrect estimation of the remaining
time.

In short, I would like to commit the first patch as attached, which is
much more simple than what has been sent previously, still it provides
the progress information which is useful.
--
Michael

Commits

  1. Add progress reporting to pg_checksums

  2. Fix thinko when bumping on temporary directories in pg_verify_checksums

  3. Fix thinko when bumping on temporary directories in pg_checksums