RE: BUG #15228: pgbench custom script numbering off-by-one - Mailing list pgsql-bugs

From Steven Winfield
Subject RE: BUG #15228: pgbench custom script numbering off-by-one
Date
Msg-id E9FA92C2921F31408041863B74EE4C2001AEF46280@CCPMAILDAG03.cantab.local
Whole thread Raw
In response to Re: BUG #15228: pgbench custom script numbering off-by-one  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses RE: BUG #15228: pgbench custom script numbering off-by-one  (Fabien COELHO <coelho@cri.ensmp.fr>)
List 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

pgsql-bugs by date:

Previous
From: PG Bug reporting form
Date:
Subject: BUG #15230: "Logical decoding" is not sensitive to client encodingsetting
Next
From: Frits Jalvingh
Date:
Subject: Re: BUG #15225: [XX000] ERROR: invalid DSA memory alloc request size1073741824 / Where: parallel worker