Re: pgbench small bug fix

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: pgbench small bug fix
Дата
Msg-id CA+TgmobtUBH4zVf_9Z8qJQNMat0O2j=6_C=Uq2BP5Qa2_4fynQ@mail.gmail.com
обсуждение исходный текст
Ответ на pgbench small bug fix  (Fabien COELHO <coelho@cri.ensmp.fr>)
Ответы Re: pgbench small bug fix  (Fabien COELHO <coelho@cri.ensmp.fr>)
Список pgsql-hackers
On Wed, Jan 27, 2016 at 2:31 PM, Fabien COELHO <coelho@cri.ensmp.fr> wrote:
>
> While testing for something else I encountered two small bugs under very low
> rate (--rate=0.1). The attached patches fixes these.
>
>  - when a duration (-T) is specified, ensure that pgbench ends at that
>    time (i.e. do not wait for a transaction beyond the end of the run).

Why does this use INSTR_TIME_GET_DOUBLE() and not INSTR_TIME_GET_MICROSEC()?

Also, why do we really need this change?  Won't the timer expiration
stop the thread at the right time anyway?  I mean, sure, in theory
it's wasteful for the thread to sit around doing nothing waiting for
the timer to expire, but it's not evident to me that hurts anything,
really.

>  - when there is a progress (-P) report, ensure that all progress
>    reports are shown even if no more transactions are schedule.

That's pretty ugly - it would be easy for the test at the top of the
loop to be left out of sync with the similar test inside the loop by
some future patch.  And again, I wonder why this is really a bug.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: postgres_fdw join pushdown (was Re: Custom/Foreign-Join-APIs)
Следующее
От: Tom Lane
Дата:
Сообщение: Re: WIP: Make timestamptz_out less slow.