Re: [HACKERS] pgbench - minor fix for meta command only scripts

Поиск
Список
Период
Сортировка
Искать
От
Fabien COELHO
Тема
Re: [HACKERS] pgbench - minor fix for meta command only scripts
Дата
Msg-id
alpine.DEB.2.20.1709042249120.19424@lancre
Ответ на
Список
Дерево обсуждения
pgbench - minor fix for meta command only scripts Fabien COELHO <coelho@cri.ensmp.fr>
Re: pgbench - minor fix for meta command only scripts Michael Paquier <michael.paquier@gmail.com>
Re: pgbench - minor fix for meta command only scripts Fabien COELHO <coelho@cri.ensmp.fr>
Re: pgbench - minor fix for meta command only scripts Tom Lane <tgl@sss.pgh.pa.us>
Re: pgbench - minor fix for meta command only scripts Fabien COELHO <coelho@cri.ensmp.fr>
Re: pgbench - minor fix for meta command only scripts Fabien COELHO <coelho@cri.ensmp.fr>
Re: pgbench - minor fix for meta command only scripts Heikki Linnakangas <hlinnaka@iki.fi>
Re: pgbench - minor fix for meta command only scripts Fabien COELHO <coelho@cri.ensmp.fr>
Re: pgbench - minor fix for meta command only scripts Fabien COELHO <coelho@cri.ensmp.fr>
Re: pgbench - minor fix for meta command only scripts Heikki Linnakangas <hlinnaka@iki.fi>
Re: [HACKERS] pgbench - minor fix for meta command only scripts Jeff Janes <jeff.janes@gmail.com>
Re: [HACKERS] pgbench - minor fix for meta command only scripts Fabien COELHO <coelho@cri.ensmp.fr>
Re: [HACKERS] pgbench - minor fix for meta command only scripts Jeff Janes <jeff.janes@gmail.com>
Re: [HACKERS] pgbench - minor fix for meta command only scripts Fabien COELHO <coelho@cri.ensmp.fr>
Re: [HACKERS] pgbench - minor fix for meta command only scripts Robert Haas <robertmhaas@gmail.com>
Re: [HACKERS] pgbench - minor fix for meta command only scripts Fabien COELHO <coelho@cri.ensmp.fr>
Re: [HACKERS] pgbench - minor fix for meta command only scripts Jeff Janes <jeff.janes@gmail.com>
Re: [HACKERS] pgbench - minor fix for meta command only scripts Fabien COELHO <coelho@cri.ensmp.fr>
Re: [HACKERS] pgbench - minor fix for meta command only scripts Noah Misch <noah@leadboat.com>
Re: [HACKERS] pgbench - minor fix for meta command only scripts Jeff Janes <jeff.janes@gmail.com>
Re: [HACKERS] pgbench - minor fix for meta command only scripts Fabien COELHO <coelho@cri.ensmp.fr>
Re: [HACKERS] pgbench - minor fix for meta command only scripts Heikki Linnakangas <hlinnaka@iki.fi>

Hello Jeff,

>>> I have fixed a bug introduced in the patch by changing && by || in the
>>> (min_sec > 0 && maxsock != -1) condition which was inducing errors with
>>> multi-threads & clients...

> Since this commit (12788ae49e1933f463bc5), if I use the --rate to throttle
> the transaction rate, it does get throttled to about the indicated speed,
> but the pg_bench consumes the entire CPU.
>
>
> At the block of code starting
>        if (min_usec > 0 && maxsock != -1)
>
> If maxsock == -1, then there is no sleep happening.

Argh, shame on me:-(

I cannot find the "induced errors" I was refering to in the message... 
Sleeping is definitely needed to avoid a hard loop.

Patch attached fixes it and does not seem introduce any special issue...

Should probably be backpatched.

Thanks for the debug!

-- 
Fabien.
-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
В списке pgsql-hackers по дате отправления
От: Andres Freund
Дата:
От: Jeff Janes
Дата:
FAQ