The following bug has been logged on the website:
Bug reference: 15228
Logged by: Steven Winfield
Email address: steven.winfield@cantabcapital.com
PostgreSQL version: 10.4
Operating system: RHEL 7.4
Description:
Hi,
There's an off-by-one error in script numbering in the human readable vs.
machine readable logs, i.e.:
echo SELECT 1 > script1.pgbench
echo SELECT 2 > script2.pgbench
pgbench -f script1.pgbench -f script2.pgbench -t 10 -l -r -n -d postgres <+
usual host/port args>
In the human readable output the scripts are numbered 1 and 2:
...
transaction type: multiple scripts
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 = 1.546 ms
tps = 646.952556 (including connections establishing)
tps = 3325.667669 (excluding connections establishing)
SQL script 1: script1.pgbench
- weight: 1 (targets 50.0% of total)
- 5 transactions (50.0% of total, tps = 323.476278)
- latency average = 0.298 ms
- latency stddev = 0.195 ms
- statement latencies in milliseconds:
0.298 SELECT 1
SQL script 2: script2.pgbench
- weight: 1 (targets 50.0% of total)
- 5 transactions (50.0% of total, tps = 323.476278)
- latency average = 0.186 ms
- latency stddev = 0.003 ms
- statement latencies in milliseconds:
0.187 SELECT 2
...but in the 4th column of the log files written by pgbench they are
numbered 0 and 1:
0 0 686 0 1528121961 383002
0 1 229 0 1528121961 383228
0 2 202 0 1528121961 383430
0 3 188 1 1528121961 383618
0 4 187 1 1528121961 383806
0 5 188 0 1528121961 383993
0 6 181 1 1528121961 384174
0 7 187 1 1528121961 384361
0 8 189 1 1528121961 384550
0 9 185 0 1528121961 384735
It would be nice if these two outputs agreed.
Thanks,
Steve.