Re: Fix around conn_duration in pgbench

From: Yugo NAGATA <nagata(at)sraoss(dot)co(dot)jp>
To: Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Fix around conn_duration in pgbench
Date: 2021-06-15 14:24:00
Message-ID: 20210615232400.f2c322755af768596ecf839c@sraoss.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, 14 Jun 2021 10:57:07 +0200 (CEST)
Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr> wrote:

> > 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.
>
> I'm fine with the implied code simplification, but it deserves a comment.

Thank you for adding comments!

> > 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.
>
> I'm fine with that, even if it only concerns is_connect. I've updated the
> command to work whether now is initially set or not.

Ok. I agree with your update.

> Also, there is the issue of connection failures: the attached version adds
> an error message and exit for initial connections consistently.
> This is not done with is_connect, though, and I'm unsure what we should
> really do.

Well, as to connection failures, I think that we should discuss in the other
thread [1] where this issue was originally raised or in a new thread because
we can discuss this as a separated issue from the originally proposed patch.

[1] https://www.postgresql.org/message-id/flat/TYCPR01MB5870057375ACA8A73099C649F5349%40TYCPR01MB5870.jpnprd01.prod.outlook.com.

Regards,
Yugo Nagata

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2021-06-15 14:41:19 Re: [bug?] Missed parallel safety checks, and wrong parallel safety
Previous Message 孙冰 2021-06-15 14:19:46 Re: Confused by the default privilege