pgsql: Allow pgbench to use a scale larger than 21474. - Mailing list pgsql-committers

From Heikki Linnakangas
Subject pgsql: Allow pgbench to use a scale larger than 21474.
Date
Msg-id E1U089q-0008CO-KF@gemulon.postgresql.org
Whole thread Raw
List 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(-)


pgsql-committers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: pgsql: Skip truncating ON COMMIT DELETE ROWS temp tables, if the transa
Next
From: Heikki Linnakangas
Date:
Subject: Re: pgsql: Fast promote mode skips checkpoint at end of recovery.