Re: pgbench small bug fix

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>
Cc: PostgreSQL Developers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pgbench small bug fix
Date: 2016-03-09 18:13:17
Message-ID: CA+Tgmoa1gU3+2=BoB3vxw2poPRvbRY4iQ=x09M7oRE=FHvt7ww@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Mar 9, 2016 at 4:12 AM, Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr> wrote:
>> On Wed, Jan 27, 2016 at 2:31 PM, Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>
>> wrote:
>>>
>>> - when a duration (-T) is specified, ensure that pgbench ends at that
>>> time (i.e. do not wait for a transaction beyond the end of the run).
>>
>>
>> Every other place where doCustom() returns false is implemented as
>> return clientDone(...). I think this should probably do the same.
>
>
> Why not. clientDone() second arguments is totally ignored, I put true
> because it looks better.
>
>> I also think that we should probably store the end time someplace
>> instead of recomputing it in multiple places (this patch adds two such
>> places).
>
>
> Why not.
>
> Attached is a v4.

OK, I've committed the fix for the -T part. It didn't back-patch
cleanly, and it is a minor bug, so I'm not inclined to worry about it
further.

I didn't commit the fix for the -P part, because Alvaro objected to
the proposed method of fixing it as ugly, and I think he's right.
Unless you can come up with a nicer-looking fix, I think that part is
going to stay unfixed.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tomas Vondra 2016-03-09 18:18:10 Re: multivariate statistics v14
Previous Message Tom Lane 2016-03-09 18:12:46 Re: Optimization for updating foreign tables in Postgres FDW