summaryrefslogtreecommitdiff
path: root/contrib/pgbench
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2008-03-12 02:18:33 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2008-03-12 02:18:33 +0000
commitb7a67c2840f193f28a30129d08c06061ad0b39e4 (patch)
treeadefa17bb085b89d4d50c0428bc3b82308b0d6bb /contrib/pgbench
parent3030f18a1b520f73ae693ae45364893d54c5e743 (diff)
downloadpostgresql-b7a67c2840f193f28a30129d08c06061ad0b39e4.tar.gz
Add a comment explaining one of the ways that pgbench fails to fully
comply with TPC-B. Per Itagaki Takahiro and discussion of bug#3681.
Diffstat (limited to 'contrib/pgbench')
-rw-r--r--contrib/pgbench/pgbench.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/contrib/pgbench/pgbench.c b/contrib/pgbench/pgbench.c
index b5082e0abd..4dabe6f0ba 100644
--- a/contrib/pgbench/pgbench.c
+++ b/contrib/pgbench/pgbench.c
@@ -1,5 +1,5 @@
/*
- * $PostgreSQL: pgsql/contrib/pgbench/pgbench.c,v 1.76 2008/03/10 01:23:04 tgl Exp $
+ * $PostgreSQL: pgsql/contrib/pgbench/pgbench.c,v 1.77 2008/03/12 02:18:33 tgl Exp $
*
* pgbench: a simple benchmark program for PostgreSQL
* written by Tatsuo Ishii
@@ -811,6 +811,16 @@ init(void)
{
PGconn *con;
PGresult *res;
+ /*
+ * Note: TPC-B requires at least 100 bytes per row, and the "filler"
+ * fields in these table declarations were intended to comply with that.
+ * But because they default to NULLs, they don't actually take any
+ * space. We could fix that by giving them non-null default values.
+ * However, that would completely break comparability of pgbench
+ * results with prior versions. Since pgbench has never pretended
+ * to be fully TPC-B compliant anyway, we stick with the historical
+ * behavior.
+ */
static char *DDLs[] = {
"drop table if exists branches",
"create table branches(bid int not null,bbalance int,filler char(88)) with (fillfactor=%d)",