RE: pgbench: option delaying queries till connections establishment?

Hayato Kuroda (Fujitsu) <kuroda.hayato@fujitsu.com>

From: "kuroda.hayato@fujitsu.com" <kuroda.hayato@fujitsu.com>
To: 'Fabien COELHO' <coelho@cri.ensmp.fr>
Cc: Andres Freund <andres@anarazel.de>, Daniel Gustafsson <daniel@yesql.se>, "pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>
Date: 2020-11-11T11:11:48Z
Lists: pgsql-hackers
Dear Fabien,

> Usually I run many pgbench through scripts, so I'm probably not there to 
> check a lone stderr failure at the beginning if performance figures are
> actually reported.

> I can remove the line, but I strongly believe that reporting performance 
> figures if some client connection failed thus the bench could not run as 
> prescribed is a bad behavior. The good news is that it is probably quite 
> unlikely. So I'd prefer to keep it and possibly submit a patch to change 
> the behavior.

I agree such a situation is very bad, and I understood you have a plan to 
submit patches for fix it. If so leaving lines as a TODO is OK.

> Should be this one: https://commitfest.postgresql.org/30/2624/

This discussion is still on-going, but I can see that the starting time
may be delayed for looking up all pgbench-variables.
(I think the status of this thread might be wrong. it should be
'Needs review,' but now 'Waiting on Author.')

This patch is mostly good and can change a review status soon,
however, I think it should wait that related patch.
Please discuss how to fix it with Tom, and this will commit soon.

Hayato Kuroda
FUJITSU LIMITED




Commits

  1. Fix new pthread code to respect --disable-thread-safety.

  2. Add missing pthread_barrier_t.

  3. pgbench: Improve time logic.

  4. pgbench: Refactor thread portability support.

  5. pgbench: Synchronize client threads.

  6. Fix bogus logic for skipping unnecessary partcollation dependencies.