Fix around conn_duration in pgbench

From: Yugo NAGATA <nagata(at)sraoss(dot)co(dot)jp>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Fix around conn_duration in pgbench
Date: 2021-06-14 06:11:55
Message-ID: 20210614151155.a393bc7d8fed183e38c9f52a@sraoss.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

TState has a field called "conn_duration" and this is, the comment says,
"cumulated connection and deconnection delays". This value is summed over
threads and reported as "average connection time" under -C/--connect.
If this options is not specified, the value is never used.

However, I found that conn_duration is calculated even when -C/--connect
is not specified, which is waste. SO we can remove this code as fixed in
the attached patch.

In addition, deconnection delays are not cumulated even under -C/--connect
in spite of mentioned in the comment. I also fixed this in the attached patch.

Regards,
Yugo Nagata

--
Yugo NAGATA <nagata(at)sraoss(dot)co(dot)jp>

Attachment Content-Type Size
pgbench_conn_duration.patch text/x-diff 1004 bytes

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2021-06-14 06:32:12 Re: [bug?] Missed parallel safety checks, and wrong parallel safety
Previous Message Thomas Munro 2021-06-14 06:11:51 Re: An out-of-date comment in nodeIndexonlyscan.c