Re: Add progress reporting to pg_verifybackup

Поиск
Список
Период
Сортировка
От Masahiko Sawada
Тема Re: Add progress reporting to pg_verifybackup
Дата
Msg-id CAD21AoCLBKAyjXyTJJ0GC2QtWtxXfFKDA7iyR=EqLqUp50iQYQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Add progress reporting to pg_verifybackup  (Michael Paquier <michael@paquier.xyz>)
Ответы Re: Add progress reporting to pg_verifybackup  (Michael Paquier <michael@paquier.xyz>)
Список pgsql-hackers
On Wed, Feb 1, 2023 at 10:25 AM Michael Paquier <michael@paquier.xyz> wrote:
>
> 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"

Agreed.

>
> Could you add a check based on command_fails_like() in 004_options.pl,
> at least?

Agreed, done in v2 patch.

>   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().

It seems that the --progress option doesn't work with command_like()
since the progress information is written in stderr but command_like()
doesn't want it.

Regards,

-- 
Masahiko Sawada
Amazon Web Services: https://aws.amazon.com

Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Will Mortensen
Дата:
Сообщение: Re: Exposing the lock manager's WaitForLockers() to SQL
Следующее
От: David Rowley
Дата:
Сообщение: Re: heapgettup refactoring