From 89d00cbe01447fd36edbc3bed659f869b18172d1 Mon Sep 17 00:00:00 2001
From: Heikki Linnakangas
Date: Tue, 29 Jan 2013 11:49:40 +0200
Subject: 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.
---
doc/src/sgml/pgbench.sgml | 5 +++++
1 file changed, 5 insertions(+)
(limited to 'doc/src')
diff --git a/doc/src/sgml/pgbench.sgml b/doc/src/sgml/pgbench.sgml
index 58686b1a8b..9ed8b76963 100644
--- a/doc/src/sgml/pgbench.sgml
+++ b/doc/src/sgml/pgbench.sgml
@@ -185,6 +185,11 @@ pgbench options> dbname>
Multiply the number of rows generated by the scale factor.
For example, -s 100> will create 10,000,000 rows
in the pgbench_accounts> table. Default is 1.
+ When the scale is 20,000 or larger, the columns used to
+ hold account identifiers (aid columns)
+ will switch to using larger integers (bigint),
+ in order to be big enough to hold the range of account
+ identifiers.
--
cgit v1.2.3