RE: seems like a bug in pgbench -R - Mailing list pgsql-hackers

From Imai, Yoshikazu
Subject RE: seems like a bug in pgbench -R
Date
Msg-id 0F97FA9ABBDBE54F91744A9B37151A513274C1@g01jpexmbkw24
Whole thread Raw
In response to RE: seems like a bug in pgbench -R  (Fabien COELHO <coelho@cri.ensmp.fr>)
Responses RE: seems like a bug in pgbench -R  (Fabien COELHO <coelho@cri.ensmp.fr>)
List pgsql-hackers
On Wed, July 24, 2019 at 7:02 PM, Fabien COELHO wrote:
> > but I have one question. Is it better adding any check like if(maxsock
> > != -1) before the select?
> >
> > else                /* no explicit delay, select without timeout */
> > {
> >    nsocks = select(maxsock + 1, &input_mask, NULL, NULL, NULL); }
> 
> I think that it is not necessary because this case cannot happen: If some
> clients are still running (remains > 0), they are either sleeping, in
> which case there would be a timeout, or they are waiting for something
> from the server, otherwise the script could be advanced further so there
> would be something else to do for the thread.

Ah, I understand.

> We could check this by adding "Assert(maxsock != -1);" before this select,
> but I would not do that for a released version.

Yeah I also imagined that we can use Assert, but ah, it's released version.
I got it. Thanks for telling that.

So I'll mark this ready for committer.

--
Yoshikazu Imai




pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: [PATCH] minor bugfix for pg_basebackup (9.6 ~ )
Next
From: Michael Paquier
Date:
Subject: Re: Compile from source using latest Microsoft Windows SDK