Re: Confusing error message in pgbench

From: Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>
To: Tatsuo Ishii <ishii(at)sraoss(dot)co(dot)jp>
Cc: PostgreSQL Developers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Confusing error message in pgbench
Date: 2017-08-02 15:26:24
Message-ID: alpine.DEB.2.20.1708021707350.3746@lancre
Views: Raw Message | Whole Thread | Download mbox
Thread:
Lists: pgsql-hackers


Hello Tatsuo-san,

> I found an error message in pgbench is quite confusing.
>
> pgbench -S -M extended -c 1 -T 30 test
> query mode (-M) should be specified before any transaction scripts (-f or -b)
>
> Since there's no -f or -b option is specified, users will be
> confused.

Indeed.

> Actually the error occurs because pgbench implicitly introduces a built
> in script for -S. To eliminate the confusion, I think the error message
> should be fixed like this:

The idea is that -S/-N documentations say that it is just a shortcut for
-b, but the explanation (eg --help) is too far away.

> query mode (-M) should be specified before transaction type (-S or -N)
> or any transaction scripts (-f or -b)

I would suggest to make it even shorter, see attached:

query mode (-M) should be specified before any transaction scripts (-f,
-b, -S or -N).

I'm wondering whether it could/should be "any transaction script". My
English level does not allow to decide.

--
Fabien.

Attachment Content-Type Size
pgbench-query-mode-error-2.patch text/x-diff 601 bytes

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2017-08-02 15:34:13 Re: pgsql 10: hash indexes testing
Previous Message Robert Haas 2017-08-02 15:17:23 Re: Macros bundling RELKIND_* conditions