<me3p282mb316684190982f54bdbd4fe90b6...@me3p282mb3166.ausp282.prod.outlook.com>

> 
> On Sat, 23 Dec 2023 at 07:18, Chen Hao Hsu <johnh...@gmail.com> wrote:
>> Hello,
>>
>> pgbench mixes int and int64 to initialize the tables.
>> When a large enough scale factor is passed, initPopulateTable
>> overflows leading to it never completing, ie.
>>
>> 2147400000 of 2200000000 tuples (97%) of
>> pgbench_accounts done (elapsed 4038.83 s, remaining 98.93 s)
>> -2147400000 of 2200000000 tuples (-97%) of
>> pgbench_accounts done (elapsed 4038.97 s, remaining -8176.86 s)
>>
>>
>> Attached is a patch that fixes this, pgbench -i -s 22000 works now.
> 
> I think only the following line can fix this.
> 
> +     int64                   k;
> 
> Do not need to modify the type of `n`, right?

You are right. n represents the return value of pg_snprintf, which is
the byte length of the formatted data, which is int, not int64.

Best reagards,
--
Tatsuo Ishii
SRA OSS LLC
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp


Reply via email to