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

From: Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>
To: Steven Winfield <Steven(dot)Winfield(at)cantabcapital(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "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-06 02:51:23
Message-ID: alpine.DEB.2.21.1806060410540.10347@lancre
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs


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.

Attachment Content-Type Size
pgbench-script-number-1.patch text/plain 876 bytes

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message K S, Sandhya (Nokia - IN/Bangalore) 2018-06-06 07:06:24 psql crashes found when executing slash commands
Previous Message Thomas Munro 2018-06-05 21:36:37 Re: BUG #15225: [XX000] ERROR: invalid DSA memory alloc request size 1073741824 / Where: parallel worker