Re: Add progress reporting to pg_verifybackup - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: Add progress reporting to pg_verifybackup
Date
Msg-id Y9m/bQZ12dczrJtF@paquier.xyz
Whole thread Raw
In response to Add progress reporting to pg_verifybackup  (Masahiko Sawada <sawada.mshk@gmail.com>)
Responses Re: Add progress reporting to pg_verifybackup
List pgsql-hackers
On Fri, Jan 06, 2023 at 04:28:42PM +0900, Masahiko Sawada wrote:
> I've attached the simple patch to add the progress reporting option to
> pg_verifybackup. The progress information is displayed with --progress
> option only during the checksum verification, which is the most time
> consuming task. It cannot be used together with --quiet option.

That looks helpful, particularly when a backup has many relation
files.  Calculating the total size when browsing the file list looks
fine.

+   /* Complain if the specified arguments conflict */
+   if (show_progress && quiet)
+       pg_fatal("cannot specify both --progress and --quiet");

Nothing on HEAD proposes --progress and --quiet at the same time from
what I can see, so just disabling the combination is fine by me.  For
the error message, I would recommend to switch to a more generic
pattern, as of:
"cannot specify both %s and %s", "-P/--progress", "-q/--quiet"

Could you add a check based on command_fails_like() in 004_options.pl,
at least?  A second test to check after the output of --progress would
be a nice bonus, for example by sticking --progress into one of the
existing commands doing a command_like().
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: Matthias van de Meent
Date:
Subject: Re: BUG: Postgres 14 + vacuum_defer_cleanup_age + FOR UPDATE + UPDATE
Next
From: Michael Paquier
Date:
Subject: Re: Worth using personality(ADDR_NO_RANDOMIZE) for EXEC_BACKEND on linux?