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>
Cc: Fabien COELHO <coelho@cri.ensmp.fr>,
Kyotaro Horiguchi <horikyota.ntt@gmail.com>, kuroda.hayato@fujitsu.com,
PostgreSQL Developers <pgsql-hackers@lists.postgresql.org>
Date: 2021-09-29T13:11:53Z
Lists: pgsql-hackers
On 2021/09/24 11:26, Fujii Masao wrote: > > > On 2021/09/24 7:26, Yugo NAGATA wrote: >> That makes sense. Failures of setup connection or initial connection doesn't >> seem 'static problems'. I rewrote this description to explain exit status 1 >> indicates also interal errors and early errors. >> >> Exit status 1 indicates static problems such as invalid command-line options >> or internal errors which are supposed to never occur. Early errors that occur >> when starting benchmark such as initial connection failures also exit with >> status 1. > > LGTM. Barring any objection, I will commit the patch. I extracted two changes from the patch and pushed (also back-patched) them. The remainings are the changes of handling of initial connection or logfile open failures. I agree to push them at least for the master. But I'm not sure if they should be back-patched. Without these changes, even when those failures happen, pgbench proceeds the benchmark and reports the result. But with the changes, pgbench exits immediately in that case. I'm not sure if there are people who expect this behavior, but if there are, maybe we should not change it at least at stable branches. Thought? BTW, when logfile fails to be opened, pgbench gets stuck due to commit aeb57af8e6. So even if we decided not to back-patch those changes, we should improve the handling of logfile open failure, to fix the issue. 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