Re: seems like a bug in pgbench -R

Fabien COELHO <coelho@cri.ensmp.fr>

From: Fabien COELHO <coelho@cri.ensmp.fr>
To: Tomas Vondra <tomas.vondra@2ndquadrant.com>
Cc: PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Date: 2019-03-15T16:16:50Z
Lists: pgsql-hackers
>> echo 'select 1' > select.sql
>> 
>> while /bin/true; do
>>  pgbench -n -f select.sql -R 1000 -j 8 -c 8 -T 1 > /dev/null 2>&1;
>>  date;
>> done;
>
> Indeed. I'll look at it over the weekend.
>
>> So I guess this is a bug in 12788ae49e1933f463bc59a6efe46c4a01701b76, or
>> one of the other commits touching this part of the code.

I could not reproduce this issue on head, but I confirm on 11.2.

-- 
Fabien.


Commits

  1. Fix possible lockup in pgbench with -R.

  2. Rework the pgbench state machine code for clarity

  3. Refactor script execution state machine in pgbench.