Fixing pgbench init overflow - Mailing list pgsql-hackers

From Chen Hao Hsu
Subject Fixing pgbench init overflow
Date
Msg-id CA+-JvFvHsOafjHcuFPfkyouHNZvbOXhBNhwZxKm3WNgYz9bwzA@mail.gmail.com
Whole thread Raw
Responses Re: Fixing pgbench init overflow
List pgsql-hackers
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.

-- 
John Hsu - Amazon Web Services

Attachment

pgsql-hackers by date:

Previous
From: Przemysław Sztoch
Date:
Subject: Re: date_trunc function in interval version
Next
From: Japin Li
Date:
Subject: Re: Transaction timeout