Re: BUG #17148: About --no-strict-names option and --quiet option of pg_amcheck command

Поиск
Список
Период
Сортировка
От Euler Taveira
Тема Re: BUG #17148: About --no-strict-names option and --quiet option of pg_amcheck command
Дата
Msg-id fb17eac7-f5cf-4e6f-9b67-f5fb4855d1d9@www.fastmail.com
обсуждение исходный текст
Ответ на Re: BUG #17148: About --no-strict-names option and --quiet option of pg_amcheck command  (Daniel Gustafsson <daniel@yesql.se>)
Ответы Re: BUG #17148: About --no-strict-names option and --quiet option of pg_amcheck command  (Daniel Gustafsson <daniel@yesql.se>)
Список pgsql-bugs
On Tue, Aug 17, 2021, at 8:06 AM, Daniel Gustafsson wrote:
Julien Rouhaud also pointed out off-list that the help output and documentation
aren't in agreement about how --quiet works. In the documentation we say:

"Print fewer messages, and less detail regarding any server errors."

But the help output takes a stronger position on this:

$ ./bin/pg_amcheck --help |grep quiet
  -q, --quiet                     don't write any messages

The latter isn't entirely true IMO, so I think we should reconcile them with
something like this while in here and fixing things anyways:
I suggest that it should be a message that we already use in another binaries
such as "do not print any output, except for errors". This message is probably
more accurate than "don't write any messages" even for the other binaries
(clusterdb, reindexdb, and vacuumdb) too.

For example, vacuumdb prints an error message even though --quiet is provided.

$ vacuumdb -d postgres -p 8888 --quiet
vacuumdb: error: connection to server on socket "/tmp/.s.PGSQL.8888" failed: No such file or directory
Is the server running locally and accepting connections on that socket?

quiet option is not strict; it doesn't omit *all* messages (including fatal or
error messages). We can debate if the current behavior is fine for most use
cases. It might surprise users while writing a script that they should discard
the standard error output even though the command contains a --quiet option.

That's a different (but related) patch but IMO we should change the --help
description because it is (a) not accurate and (b) doesn't match the
documentation: "don't write any messages" vs "Do not display progress
messages".


--
Euler Taveira

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

Предыдущее
От: Daniel Gustafsson
Дата:
Сообщение: Re: BUG #17148: About --no-strict-names option and --quiet option of pg_amcheck command
Следующее
От: Daniel Gustafsson
Дата:
Сообщение: Re: BUG #17148: About --no-strict-names option and --quiet option of pg_amcheck command