Re: pgbench bug candidate: negative "initial connection time"
Yugo Nagata <nagata@sraoss.co.jp>
From: Yugo NAGATA <nagata@sraoss.co.jp>
To: "kuroda.hayato@fujitsu.com" <kuroda.hayato@fujitsu.com>
Cc: 'Fabien COELHO' <coelho@cri.ensmp.fr>,
"'pgsql-hackers@lists.postgresql.org'"
<pgsql-hackers@lists.postgresql.org>
Date: 2021-06-14T08:07:02Z
Lists: pgsql-hackers
Attachments
- pgbench_connect_abort.patch (text/x-diff) patch
On Mon, 14 Jun 2021 00:42:12 +0000 "kuroda.hayato@fujitsu.com" <kuroda.hayato@fujitsu.com> wrote: > Dear Fabien, > > Thank you for replying! > > > Hmmm. Possibly. Another option could be not to report anything after some > > errors. I'm not sure, because it would depend on the use case. I guess the > > command returned an error status as well. > > I did not know any use cases and decisions , but I vote to report nothing when error occurs. I would prefer to abort the thread whose connection got an error and report results for other threads, as handled when doConnect fails in CSTATE_START_TX state. In this case, we have to set the state to CSTATE_ABORT before going to 'done' as fixed in the attached patch, in order to ensure that exit status is 2 and the result reports "pgbench: fatal: Run was aborted; the above results are incomplete." Otherwise, if we want pgbench to exit immediately when a connection error occurs, we have tocall exit(1) to ensure the exit code is 1, of course. Anyway, it is wrong that thecurrent pgbench exit successfully with exit code 0 when doConnnect fails. Regards, Yugo Nagata -- Yugo NAGATA <nagata@sraoss.co.jp>
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