Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fQOY1-00071A-DF for pgsql-bugs@arkaria.postgresql.org; Wed, 06 Jun 2018 02:51:41 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fQOXw-0001oJ-1P for pgsql-bugs@arkaria.postgresql.org; Wed, 06 Jun 2018 02:51:36 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fQOXv-0001o9-Js for pgsql-bugs@lists.postgresql.org; Wed, 06 Jun 2018 02:51:35 +0000 Received: from sfr-1.cri.mines-paristech.fr ([77.158.180.225] helo=mailhac.cri.ensmp.fr) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fQOXn-0007m0-VF for pgsql-bugs@lists.postgresql.org; Wed, 06 Jun 2018 02:51:34 +0000 Received: from lancre (161.200.219.88.rev.sfr.net [88.219.200.161]) by mailhac.cri.ensmp.fr (Postfix) with ESMTPSA id AD289C0168; Wed, 6 Jun 2018 04:51:24 +0200 (CEST) Date: Wed, 6 Jun 2018 04:51:23 +0200 (CEST) From: Fabien COELHO X-X-Sender: fabien@lancre To: Steven Winfield cc: Tom Lane , "pgsql-bugs@lists.postgresql.org" Subject: RE: BUG #15228: pgbench custom script numbering off-by-one In-Reply-To: Message-ID: References: <152812306193.26720.11550263673951064628@wrigleys.postgresql.org> <6240.1528142435@sss.pgh.pa.us> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="8323329-1516978504-1528251643=:10347" Content-ID: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --8323329-1516978504-1528251643=:10347 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 8BIT Content-ID: 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. --8323329-1516978504-1528251643=:10347 Content-Type: text/plain; name=pgbench-script-number-1.patch Content-Transfer-Encoding: BASE64 Content-ID: Content-Description: Content-Disposition: attachment; filename=pgbench-script-number-1.patch ZGlmZiAtLWdpdCBhL2RvYy9zcmMvc2dtbC9yZWYvcGdiZW5jaC5zZ21sIGIv ZG9jL3NyYy9zZ21sL3JlZi9wZ2JlbmNoLnNnbWwNCmluZGV4IDdiZDAxYTI0 ZWEuLjhmODRlZmZkM2QgMTAwNjQ0DQotLS0gYS9kb2Mvc3JjL3NnbWwvcmVm L3BnYmVuY2guc2dtbA0KKysrIGIvZG9jL3NyYy9zZ21sL3JlZi9wZ2JlbmNo LnNnbWwNCkBAIC0xNTkyLDcgKzE1OTIsOCBAQCBFTkQ7DQogICAgcnVuIGJ5 IHRoYXQgc2Vzc2lvbiwNCiAgICA8cmVwbGFjZWFibGU+dGltZTwvcmVwbGFj ZWFibGU+IGlzIHRoZSB0b3RhbCBlbGFwc2VkIHRyYW5zYWN0aW9uI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