]> git.ipfire.org Git - thirdparty/postgresql.git/commit
pgbench: Fix bug in measurement of disconnection delays.
authorFujii Masao <fujii@postgresql.org>
Wed, 1 Sep 2021 08:05:13 +0000 (17:05 +0900)
committerFujii Masao <fujii@postgresql.org>
Wed, 1 Sep 2021 08:06:11 +0000 (17:06 +0900)
commitd760d942c73c9a161feefb7dc4a0004b9b4e7787
tree5b9da814cc9ea0367ba5effc3d001961a7ad00a6
parentb7ad093d50e13aadfffb1662f53cd16a1c59e09d
pgbench: Fix bug in measurement of disconnection delays.

When -C/--connect option is specified, pgbench establishes and closes
the connection for each transaction. In this case pgbench needs to
measure the times taken for all those connections and disconnections,
to include the average connection time in the benchmark result.
But previously pgbench could not measure those disconnection delays.
To fix the bug, this commit makes pgbench measure the disconnection
delays whenever the connection is closed at the end of transaction,
if -C/--connect option is specified.

Back-patch to v14. Per discussion, we concluded not to back-patch to v13
or before because changing that behavior in stable branches would
surprise users rather than providing benefits.

Author: Yugo Nagata
Reviewed-by: Fabien COELHO, Tatsuo Ishii, Asif Rehman, Fujii Masao
Discussion: https://postgr.es/m/20210614151155.a393bc7d8fed183e38c9f52a@sraoss.co.jp
src/bin/pgbench/pgbench.c