Re: Fix around conn_duration in pgbench - Mailing list pgsql-hackers

From Fujii Masao
Subject Re: Fix around conn_duration in pgbench
Date
Msg-id 4296ed3b-40d2-30a3-389d-2b0c2ecdb22b@oss.nttdata.com
Whole thread Raw
In response to Re: Fix around conn_duration in pgbench  (Fujii Masao <masao.fujii@oss.nttdata.com>)
Responses Re: Fix around conn_duration in pgbench  (Yugo NAGATA <nagata@sraoss.co.jp>)
List pgsql-hackers

On 2021/08/11 13:56, Fujii Masao wrote:
> Yes, but I was thinking that's a bug that we should fix.
> IOW, I was thinking that, in v13, both connection and disconnection delays
> should be measured whether -C is specified or not, *per spec*.
> But, in v13, the disconnection delays are not measured in the cases
> where -C is specified and not specified. So I was thinking that this is
> a bug and we should fix those both cases.
> 
> But you're thinking that, in v13, the disconnection delays don't need to
> be measured because they are not measured for now?

Please let me clarify my thought.

In master and v14,

# Expected behavior
(1) Both connection and disconnection delays should be measured
       only when -C is specified, but not otherwise.
(2) When -C is specified, since each transaction establishes and closes
       a connection, those delays should be measured for each transaction.

# Current behavior
(1) Connection delay is measured whether -C is specified or not.
(2) Even when -C is specified, disconnection delay is NOT measured
       at the end of transaction.

# What the patch should do
(1) Make pgbench skip measuring connection and disconnection delays
       if not necessary (i.e., -C is not specified).
(2) Make pgbench measure the disconnection delays whenever
       the connection is closed at the end of transaction, when -C is specified.

In v13 or before,

# Expected behavior
(1) Both connection and disconnection delays should be measured
       whether -C is specified or not. Because information about those delays
       is used for the benchmark result report.
(2) When -C is specified, since each transaction establishes and closes
       a connection, those delays should be measured for each transaction.

# Current behavior
(1)(2) Disconnection delay is NOT measured whether -C is specified or not.

# What the patch should do
(1)(2) Make pgbench measure the disconnection delays whenever
             the connection is closed at the end of transaction (for -C case)
             and the end of thread (for NOT -C case).

Thought?

Anyway, I changed the status of this patch to "Waiting on Author" in CF.

Regards,

-- 
Fujii Masao
Advanced Computing Technology Center
Research and Development Headquarters
NTT DATA CORPORATION



pgsql-hackers by date:

Previous
From: Sadhuprasad Patro
Date:
Subject: Re: Support reset of Shared objects statistics in "pg_stat_reset" function
Next
From: Simon Riggs
Date:
Subject: Re: Middleware Messages for FE/BE