Re: pgbench bug candidate: negative "initial connection time"
Fujii Masao <masao.fujii@oss.nttdata.com>
From: Fujii Masao <masao.fujii@oss.nttdata.com>
To: Yugo NAGATA <nagata@sraoss.co.jp>, Fabien COELHO <coelho@cri.ensmp.fr>
Cc: Kyotaro Horiguchi <horikyota.ntt@gmail.com>, kuroda.hayato@fujitsu.com,
PostgreSQL Developers <pgsql-hackers@lists.postgresql.org>
Date: 2021-09-06T17:34:17Z
Lists: pgsql-hackers
On 2021/07/29 13:23, Yugo NAGATA wrote:
> Hello,
>
> On Fri, 18 Jun 2021 15:58:48 +0200 (CEST)
> Fabien COELHO <coelho@cri.ensmp.fr> wrote:
>
>> Attached Yugo-san patch with some updates discussed in the previous mails,
>> so as to move things along.
>
> I attached the patch rebased to a change due to 856de3b39cf.
+ pg_log_fatal("connection for initialization failed");
+ pg_log_fatal("setup connection failed");
+ pg_log_fatal("cannot create connection for client %d",
These fatal messages output when doConnect() fails should be a bit more consistent each other? For example,
could not create connection for initialization
could not create connection for setup
could not create connection for client %d
I'm not sure, but *if* "xxx failed" is more proper for pgbench, what about
connection for initialization failed
connection for setup failed
connection for client %d failed
> Exit status 1 indicates static problems such as invalid command-line options.
> Errors during the run such as database errors or problems in the script will
> result in exit status 2.
While reading the code and docs related to the patch, I found
these descriptions in pgbench docs. The first description needs to be
updated? Because even database error (e.g., failure of connection for setup)
can result in exit status 1 if it happens before the benchmark actually runs.
Regards,
--
Fujii Masao
Advanced Computing Technology Center
Research and Development Headquarters
NTT DATA CORPORATION
Commits
-
pgbench: Fix typo in comment.
- d8dba4d03068 15.0 landed
-
pgbench: Improve error-handling in pgbench.
- cd29be5459f0 15.0 landed
-
pgbench: Fix handling of socket errors during benchmark.
- c5f7e702d78f 12.9 landed
- 8cf4f7118596 13.5 landed
- 8231c500ed74 14.1 landed
- 2acb7cc6b56c 15.0 landed
-
pgbench: Correct log level of message output when socket wait method fails.
- 3cc85d7d5353 13.5 landed
- 8021334d3710 14.1 landed
- d33674708948 15.0 landed
-
pgbench: Synchronize client threads.
- aeb57af8e640 14.0 cited
-
pgbench: Use common logging API
- 30a3e772b401 13.0 cited