Re: PATCH: pgbench / int64 instead of int for xact count

Поиск
Список
Период
Сортировка
Искать
От
Tomas Vondra
Тема
Re: PATCH: pgbench / int64 instead of int for xact count
Дата
в 19:21:55
Msg-id
538242CA.9030206@fuzzy.cz
Ответ на
Список
Дерево обсуждения
PATCH: pgbench / int64 instead of int for xact count Tomas Vondra <tv@fuzzy.cz>
Re: PATCH: pgbench / int64 instead of int for xact count Andres Freund <andres@2ndquadrant.com>
Re: PATCH: pgbench / int64 instead of int for xact count Tomas Vondra <tv@fuzzy.cz>
Re: PATCH: pgbench / int64 instead of int for xact count Tom Lane <tgl@sss.pgh.pa.us>
Re: PATCH: pgbench / int64 instead of int for xact count Tomas Vondra <tv@fuzzy.cz>
Re: PATCH: pgbench / int64 instead of int for xact count Tom Lane <tgl@sss.pgh.pa.us>
On 25.5.2014 20:32, Tom Lane wrote:
> Tomas Vondra  writes:
>> On 25.5.2014 19:05, Andres Freund wrote:
>>> That's not right though. On windows a long (indicated by the %l) is only
>>> 4 bytes wide. Check INT64_FORMAT. That's generated by configure/platform
>>> template files and should always be correct.
> 
>> Oh, right. v2 of the patch attached.
> 
> Hm ... if normal_xacts can overflow an int, shouldn't we expect that
> the product nxacts * nclients could?

Maybe, but I saw that as a separate thing, mostly unrelated to the
'hardware got so fast it can overflow' problem. Because nxacts is the
parameter we use to define duration, so if it din't overflow in the
past, it won't overflow today.

OTOH, thanks to hardware improvements we tend to use more clients /
higher number of transactions, so fixing this seems like a good idea.

Should we change the type of nxacts to int64 (thus allowing '-t' with
64-bit integers), or just the overflow in the printf call? I don't find
it very practical to use -t with values not fitting into 32-bits (the -T
seems better to do that), so I'm inclined to just fix the printf. Patch
v3 attached.

Tomas
В списке pgsql-hackers по дате отправления
От: Tom Lane
Дата:
От: David Fetter
Дата:
FAQ