Re: [HACKERS] pgbench - minor fix for meta command only scripts - Mailing list pgsql-hackers

From Fabien COELHO
Subject Re: [HACKERS] pgbench - minor fix for meta command only scripts
Date
Msg-id alpine.DEB.2.20.1709111044310.32517@lancre
Whole thread Raw
In response to Re: [HACKERS] pgbench - minor fix for meta command only scripts  (Jeff Janes <jeff.janes@gmail.com>)
Responses Re: [HACKERS] pgbench - minor fix for meta command only scripts
Re: [HACKERS] pgbench - minor fix for meta command only scripts
List pgsql-hackers
Hello Jeff,

Ok, the problem was a little bit more trivial than I thought.

The issue is that under a low rate there may be no transaction in 
progress, however the wait procedure was relying on select's timeout. If 
nothing is active there is nothing to wait for, thus it was an active loop 
in this case...

I've introduced a usleep call in place of select for this particular 
case. Hopefully this is portable.

ISTM that this bug exists since rate was introduced, so shame on me and 
back-patching should be needed.

-- 
Fabien.
-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Attachment

pgsql-hackers by date:

Previous
From: Amit Langote
Date:
Subject: Re: [HACKERS] Partition-wise join for join between (declaratively)partitioned tables
Next
From: Christoph Berg
Date:
Subject: Re: [HACKERS] mysql_fdw + PG10: unrecognized node type: 217