pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Fabien COELHO <coelho@cri.ensmp.fr>
To: Yugo NAGATA <nagata@sraoss.co.jp>
Cc: kuroda.hayato@fujitsu.com <kuroda.hayato@fujitsu.com>
Cc: 'pgsql-hackers@lists.postgresql.org' <pgsql-hackers@lists.postgresql.org>
Subject: Re: pgbench bug candidate: negative "initial connection time"
Date: Mon, 14 Jun 2021 11:30:14 +0200 (CEST)
Message-ID: <alpine.DEB.2.22.394.2106141108240.1338009@pseudo> (raw)
In-Reply-To: <20210614170702.af28e1eeaa055a818f5880e0@sraoss.co.jp>
References: <TYCPR01MB5870057375ACA8A73099C649F5349@TYCPR01MB5870.jpnprd01.prod.outlook.com>
	<alpine.DEB.2.22.394.2106111650360.4059032@pseudo>
	<TYAPR01MB58667A59DF050DAB01CC92F7F5319@TYAPR01MB5866.jpnprd01.prod.outlook.com>
	<20210614170702.af28e1eeaa055a818f5880e0@sraoss.co.jp>


>>> Hmmm. Possibly. Another option could be not to report anything after some
>>> errors. I'm not sure, because it would depend on the use case. I guess the
>>> command returned an error status as well.
>>
>> I did not know any use cases and decisions , but I vote to report nothing when error occurs.
>
> I would prefer to abort the thread whose connection got an error and report
> results for other threads, as handled when doConnect fails in CSTATE_START_TX
> state.

It is unclear to me whether it makes much sense to report performance when 
things go wrong. At least when a one connection per client bench is run 
ISTM that it should not proceed, because the bench could not even start 
as prescribe. When connection break while the bench has already started, 
maybe it makes more sense to proceed, although I guess that maybe 
reattempting connections would make also sense in such case.

> In this case, we have to set the state to CSTATE_ABORT before going to 'done'
> as fixed in the attached patch, in order to ensure that exit status is 2 and the
> result reports "pgbench: fatal: Run was aborted; the above results are incomplete."

Hmmm. I agree that at least reporting that there was an issue is a good 
idea.

> Otherwise, if we want pgbench to exit immediately when a connection error occurs,
> we have tocall exit(1) to ensure the exit code is 1, of course. Anyway, it is wrong
> that thecurrent pgbench exit successfully with exit code 0 when doConnnect fails.

Indeed, I can only agree on this one.

-- 
Fabien.





view thread (27+ messages)  latest in thread

Message-ID: <alpine.DEB.2.22.394.2106141108240.1338009@pseudo>
Permalink:  ../alpine.DEB.2.22.394.2106141108240.1338009@pseudo/
Also on:    postgresql.org/message-id/alpine.DEB.2.22.394.2106141108240.1338009@pseudo

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-hackers@postgresql.org
  Cc: coelho@cri.ensmp.fr, nagata@sraoss.co.jp, kuroda.hayato@fujitsu.com
  Subject: Re: pgbench bug candidate: negative "initial connection time"
  In-Reply-To: <alpine.DEB.2.22.394.2106141108240.1338009@pseudo>
  References: <TYCPR01MB5870057375ACA8A73099C649F5349@TYCPR01MB5870.jpnprd01.prod.outlook.com> <alpine.DEB.2.22.394.2106111650360.4059032@pseudo> <TYAPR01MB58667A59DF050DAB01CC92F7F5319@TYAPR01MB5866.jpnprd01.prod.outlook.com> <20210614170702.af28e1eeaa055a818f5880e0@sraoss.co.jp> <alpine.DEB.2.22.394.2106141108240.1338009@pseudo>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox