Re: pgbench show progress report extremely frequently if "--progress" >= 2148 caused by integer overflow

Поиск
Список
Период
Сортировка
От Fabien COELHO
Тема Re: pgbench show progress report extremely frequently if "--progress" >= 2148 caused by integer overflow
Дата
Msg-id alpine.DEB.2.10.1401172258010.19515@sto
обсуждение исходный текст
Ответ на pgbench show progress report extremely frequently if "--progress" >= 2148 caused by integer overflow  (Kingter Wang <tew@vmware.com>)
Список pgsql-bugs
Hello,

> The integer progress multiple by 1000,000 to convert from second to
> micro-second. If progress >= 2148, then the value of progress * 1000,000
> (2,148,000,000) will larger than max value of 32 bits integer
> (2,147,483,647).

Indeed. Shame on me! I had not thought of overflows because of the false
security of in64 target type. Thanks for the missing cast!

--
Fabien.

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [HACKERS] surprising to_timestamp behavior
Следующее
От: marko@joh.to
Дата:
Сообщение: BUG #8870: PL/PgSQL, SELECT .. INTO and the number of result columns