Re: pgbench bug candidate: negative "initial connection time"
Fabien COELHO <coelho@cri.ensmp.fr>
From: Fabien COELHO <coelho@cri.ensmp.fr>
To: Yugo NAGATA <nagata@sraoss.co.jp>
Cc: "kuroda.hayato@fujitsu.com" <kuroda.hayato@fujitsu.com>,
PostgreSQL Developers <pgsql-hackers@lists.postgresql.org>
Date: 2021-06-17T09:52:04Z
Lists: pgsql-hackers
>> Second, currently the *only* function to change the client state is >> advanceConnectionState, so it can be checked there and any bug is only >> there. We had issues before when several functions where doing updates, >> and it was a mess to understand what was going on. I really want that it >> stays that way, so I disagree with setting the state to ABORTED from >> threadRun. Moreover I do not see that it brings a feature, so ISTM that it >> is not an actual issue not to do it? > > Ok. I gave up to change the state in threadRun. Instead, I changed the > condition at the end of bench, which enables to report abortion due to > socket errors. > > +@@ -6480,7 +6490,7 @@ main(int argc, char **argv) > + #endif /* ENABLE_THREAD_SAFETY */ > + > + for (int j = 0; j < thread->nstate; j++) > +- if (thread->state[j].state == CSTATE_ABORTED) > ++ if (thread->state[j].state != CSTATE_FINISHED) > + exit_code = 2; > + > + /* aggregate thread level stats */ > > Does this make sense? Yes, definitely. -- Fabien.
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