pgbench -f and vacuum

From: Tatsuo Ishii <ishii(at)postgresql(dot)org>
To: pgsql-hackers(at)postgresql(dot)org
Subject: pgbench -f and vacuum
Date: 2014-12-13 10:16:54
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Currently pgbench -f (run custom script) executes vacuum against
pgbench_* tables before stating bench marking if -n (or --no-vacuum)
is not specified. If those tables do not exist, pgbench fails. To
prevent this, -n must be specified. For me this behavior seems insane
because "-f" does not necessarily suppose the existence of the
pgbench_* tables. Attached patch prevents pgbench from exiting even
if those tables do not exist. Here is the sample session:

./pgbench -f /tmp/a.sql test2
starting vacuum...ERROR: relation "pgbench_branches" does not exist
ERROR: relation "pgbench_tellers" does not exist
ERROR: relation "pgbench_history" does not exist
transaction type: Custom query
scaling factor: 1
query mode: simple
number of clients: 1
number of threads: 1
number of transactions per client: 10
number of transactions actually processed: 10/10
latency average: 0.000 ms
tps = 5977.286312 (including connections establishing)
tps = 15822.784810 (excluding connections establishing)

Best regards,
Tatsuo Ishii
SRA OSS, Inc. Japan

Attachment Content-Type Size
pgbench-f-noexit-v1.patch text/x-patch 1.5 KB


Browse pgsql-hackers by date

  From Date Subject
Next Message Pavel Stehule 2014-12-13 10:19:08 moving Orafce from pgFoundry - pgFoundry management
Previous Message Craig Ringer 2014-12-13 09:40:10 Re: Commitfest problems