pgbench: Synchronize client threads.

Thomas Munro <tmunro@postgresql.org>

Commit: aeb57af8e64000cc4288a7b8b8d7cf6040eae900
Author: Thomas Munro <tmunro@postgresql.org>
Date: 2021-03-10T04:44:04Z
Releases: 14.0
pgbench: Synchronize client threads.

Wait until all pgbench threads are connected before benchmarking begins.
This fixes a problem where some connections could take a very long time
to be established because of lock contention from earlier connections,
making results unstable and bogus with high connection counts.

Author: Andres Freund <andres@anarazel.de>
Author: Fabien COELHO <coelho@cri.ensmp.fr>
Reviewed-by: Marina Polyakova <m.polyakova@postgrespro.ru>
Reviewed-by: Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Reviewed-by: Hayato Kuroda <kuroda.hayato@fujitsu.com>
Reviewed-by: David Rowley <dgrowleyml@gmail.com>
Discussion: https://postgr.es/m/20200227180100.zyvjwzcpiokfsqm2%40alap3.anarazel.de

Files

PathChange+/−
src/bin/pgbench/pgbench.c modified +41 −1

Discussion