Avoid stuck of pbgench due to skipped transactions

Поиск
Список
Период
Сортировка
От Yugo NAGATA
Тема Avoid stuck of pbgench due to skipped transactions
Дата
Msg-id 20210613040151.265ff59d832f835bbcf8b3ba@sraoss.co.jp
обсуждение исходный текст
Ответы Re: Avoid stuck of pbgench due to skipped transactions  (Fabien COELHO <coelho@cri.ensmp.fr>)
Список pgsql-hackers
Hi,

I found that pgbench could get stuck when every transaction
come to be skipped and the number of transaction is not limitted
by -t option.

For example, when I usee a large rate (-R) for throttling and a
small latency limit (-L) values with a duration (-T), pbbench
got stuck.

 $ pgbench -T 5 -R 100000000 -L 1;

When we specify the number of transactions by -t, it doesn't get
stuck because the number of skipped transactions are counted and
checked during the loop. However, the timer expiration is not
checked in the loop although it is checked before and after a
sleep for throttling. 

I think it is better to check the timer expiration even in the loop
of transaction skips and to finish pgbnech successfully because we
should correcly repport how many transactions are proccessed and
skipped also in this case, and getting stuck would not be good
anyway.

I attached a patch for this fix.

Regards,
Yugo Nagata

-- 
Yugo NAGATA <nagata@sraoss.co.jp>

Вложения

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

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: logical replication of truncate command with trigger causes Assert
Следующее
От: Tom Lane
Дата:
Сообщение: Re: recovery test failures on hoverfly