Table definition
The main table definition SQL adds these tables:
CREATE TABLE pgbench_branches(bid int not null, bbalance int, filler char(88)); ALTER TABLE pgbench_branches add primary key (bid); CREATE TABLE pgbench_tellers(tid int not null,bid int, tbalance int,filler char(84)); ALTER TABLE pgbench_tellers add primary key (tid); CREATE TABLE pgbench_accounts(aid int not null,bid int, abalance int,filler char(84)); ALTER TABLE pgbench_accounts add primary key (aid); CREATE TABLE pgbench_history(tid int,bid int,aid int,delta int, mtime timestamp,filler char(22));
Note
Before PostgreSQL 8.4, these tables did not have the pgbench_
prefix on their names. This was dangerous because a badly written pgbench
run could wipe out a real table named accounts
far too easily. Having done that once, I can tell you it can be quite embarrassing to have to explain why all the accounts are now missing from a live database server.
The intention of the various filler fields is to make sure that...