RE: BUG #15228: pgbench custom script numbering off-by-one

From: Steven Winfield <Steven(dot)Winfield(at)cantabcapital(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "pgsql-bugs(at)lists(dot)postgresql(dot)org" <pgsql-bugs(at)lists(dot)postgresql(dot)org>
Subject: RE: BUG #15228: pgbench custom script numbering off-by-one
Date: 2018-06-05 10:06:27
Message-ID: E9FA92C2921F31408041863B74EE4C2001AEF46280@CCPMAILDAG03.cantab.local
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

> So possibly we could resolve
> it by using 0-based numbering in the human-readable output, but that
> would confuse things too perhaps.
>
> Maybe we should just document it.

Changing the human readable log, plus documentation, might be fair game for a new major version.
If so, I think the only changes required are:

src/bin/pgbench/pgbench.c

@@ -4659,7 +4659,7 @@ printResults(TState *threads, StatsData *total, instr_time total_time,
printf("SQL script %d: %s\n"
" - weight: %d (targets %.1f%% of total)\n"
" - " INT64_FORMAT " transactions (%.1f%% of total, tps = %f)\n",
- i + 1, sql_script[i].desc,
+ i, sql_script[i].desc,
sql_script[i].weight,
100.0 * sql_script[i].weight / total_weight,
sstats->cnt,

doc/src/sgml/ref/pgbench.sgml

@@ -860,7 +860,9 @@ pgbench <optional> <replaceable>options</replaceable> </optional> <replaceable>d
benchmark scenarios by replacing the default transaction script
(described above) with a transaction script read from a file
(<option>-f</option> option). In this case a <quote>transaction</quote>
- counts as one execution of a script file.
+ counts as one execution of a script file. Script files are numbered
+ according to the order in which they appear on the command line,
+ beginning with zero.
</para>

<para>

What do you think?

Steve.

This email is confidential. If you are not the intended recipient, please advise us immediately and delete this message.
The registered name of Cantab- part of GAM Systematic is Cantab Capital Partners LLP.
See - http://www.gam.com/en/Legal/Email+disclosures+EU for further information on confidentiality, the risks of non-secure electronic communication, and certain disclosures which we are required to make in accordance with applicable legislation and regulations.
If you cannot access this link, please notify us by reply message and we will send the contents to you.

GAM Holding AG and its subsidiaries (Cantab – GAM Systematic) will collect and use information about you in the course of your interactions with us.
Full details about the data types we collect and what we use this for and your related rights is set out in our online privacy policy at https://www.gam.com/en/legal/privacy-policy.
Please familiarise yourself with this policy and check it from time to time for updates as it supplements this notice.

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Frits Jalvingh 2018-06-05 11:08:37 Re: BUG #15225: [XX000] ERROR: invalid DSA memory alloc request size 1073741824 / Where: parallel worker
Previous Message PG Bug reporting form 2018-06-05 08:29:11 BUG #15230: "Logical decoding" is not sensitive to client encoding setting