Re: pgsql: pg_waldump: Add a --quiet option.

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Fujii Masao <masao(dot)fujii(at)oss(dot)nttdata(dot)com>
Cc: pgsql-committers <pgsql-committers(at)lists(dot)postgresql(dot)org>
Subject: Re: pgsql: pg_waldump: Add a --quiet option.
Date: 2020-04-03 15:54:40
Message-ID: CA+TgmoYD9Aq9VuZEO3P78q=dqkA_qYA-i1SuB_f5+YOePZN7PQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

On Thu, Apr 2, 2020 at 9:41 PM Fujii Masao <masao(dot)fujii(at)oss(dot)nttdata(dot)com> wrote:
> On 2020/04/03 10:11, Robert Haas wrote:
> > pg_waldump: Add a --quiet option.
> >
> > The primary motivation for this change is that it will be used by the
> > upcoming patch to add backup manifests, but it also seems to have some
> > potential more general use.
>
> I'm not sure what the actual purpose of this feature yet, but ISTM that
> the following change is necessary. Otherwise, "empty" stats information
> is output even when --quiet is specified.
>
> - if (config.stats == true)
> + if (config.stats == true && !config.quiet)
> XLogDumpDisplayStats(&config, &stats);

Oops. That seems like a bug. It only matters if you specify --quiet
and --stats together, but even so the behavior is not as documented,
so it should be fixed. Thanks.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Browse pgsql-committers by date

  From Date Subject
Next Message Robert Haas 2020-04-03 15:56:44 pgsql: Add checksum helper functions.
Previous Message Tom Lane 2020-04-03 15:34:23 Re: pgsql: Include information on buffer usage during planning phase, in EX