pgsql: Allow pgbench to use a scale larger than 21474.

From: Heikki Linnakangas <heikki(dot)linnakangas(at)iki(dot)fi>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Allow pgbench to use a scale larger than 21474.
Date: 2013-01-29 10:11:14
Message-ID: E1U089q-0008CO-KF@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Allow pgbench to use a scale larger than 21474.

Beyond 21474, the number of accounts exceed the range for int4. Change the
initialization code to use bigint for account id columns when scale is large
enough, and switch to using int64s for the variables in pgbench code. The
threshold where we switch to bigints is set at 20000, because that's easier
to remember and document than 21474, and ensures that there is some headroom
when int4s are used.

Greg Smith, with various changes by Euler Taveira de Oliveira, Gurjeet
Singh and Satoshi Nagayasu.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/89d00cbe01447fd36edbc3bed659f869b18172d1

Modified Files
--------------
contrib/pgbench/pgbench.c | 155 +++++++++++++++++++++++++++++++++++---------
doc/src/sgml/pgbench.sgml | 5 ++
2 files changed, 128 insertions(+), 32 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Heikki Linnakangas 2013-01-29 11:31:36 Re: pgsql: Fast promote mode skips checkpoint at end of recovery.
Previous Message Heikki Linnakangas 2013-01-29 08:44:57 pgsql: Skip truncating ON COMMIT DELETE ROWS temp tables, if the transa