From: Fabien COELHO <coelho@cri.ensmp.fr>
To: Steven Winfield <Steven.Winfield@cantabcapital.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-bugs@lists.postgresql.org <pgsql-bugs@lists.postgresql.org>
Subject: RE: BUG #15228: pgbench custom script numbering off-by-one
Date: Wed, 6 Jun 2018 04:51:23 +0200 (CEST)
Message-ID: <alpine.DEB.2.21.1806060410540.10347@lancre> (raw)
In-Reply-To: <E9FA92C2921F31408041863B74EE4C2001AEF46280@CCPMAILDAG03.cantab.local>
References: <152812306193.26720.11550263673951064628@wrigleys.postgresql.org>
<6240.1528142435@sss.pgh.pa.us>
<E9FA92C2921F31408041863B74EE4C2001AEF46280@CCPMAILDAG03.cantab.local>
Hello Steven,
There were some hesitations when developing this feature for 9.6, with a
transition from starting from 0 to 1 on submission v9, without clear
outside input in the discussion to which was better, if any.
The rational for starting from 1 in the stdout report is that I felt, and
still feel, that it is more user/human friendly this way.
The 0-numbering for the log was pre-existing and as tools/scripts exist to
process that, changing it is best avoided, and it is for machines anyway.
So my 0.02€:
IMO the minimum fuss is to let it as a feature, which it is, and just
explicitely document it, so I'm on Tom's line here. See attached patch as
an attempt to do that. Could be backpatched up to 9.6.
I could also be okay with starting from 0 as well, sure, but I like
human-friendlyness so I would not bother.
>> 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:
Sure.
--
Fabien.
Attachments:pgbench-script-number-1.patch (text/plain, 876B) downloaddiff --git a/doc/src/sgml/ref/pgbench.sgml b/doc/src/sgml/ref/pgbench.sgmlindex 7bd01a24ea..8f84effd3d 100644--- a/doc/src/sgml/ref/pgbench.sgml+++ b/doc/src/sgml/ref/pgbench.sgml@@ -1592,7 +1592,8 @@ END;
run by that session,
<replaceable>time</replaceable> is the total elapsed transaction time in microseconds,
<replaceable>script_no</replaceable> identifies which script file was used (useful when
- multiple scripts were specified with <option>-f</option> or <option>-b</option>),+ multiple scripts were specified with <option>-f</option> or <option>-b</option>)+ starting from 0 (unlike the user-oriented final report on stdout which starts from 1),
and <replaceable>time_epoch</replaceable>/<replaceable>time_us</replaceable> are a
Unix-epoch time stamp and an offset
in microseconds (suitable for creating an ISO 8601
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: coelho@cri.ensmp.fr, Steven.Winfield@cantabcapital.com, tgl@sss.pgh.pa.us
Subject: Re: BUG #15228: pgbench custom script numbering off-by-one
In-Reply-To: <alpine.DEB.2.21.1806060410540.10347@lancre>
References: <152812306193.26720.11550263673951064628@wrigleys.postgresql.org> <6240.1528142435@sss.pgh.pa.us> <E9FA92C2921F31408041863B74EE4C2001AEF46280@CCPMAILDAG03.cantab.local> <alpine.DEB.2.21.1806060410540.10347@lancre>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox