From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
---|---|
To: | Aleksander Alekseev <a(dot)alekseev(at)postgrespro(dot)ru> |
Cc: | Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>, PostgreSQL Developers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: pgbench small bug fix |
Date: | 2016-03-03 18:18:47 |
Message-ID: | CA+TgmoZL-0B10HAKJ0AJj3TRZg36rcr5TkszR7k9iwetQQ_zKA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Thu, Mar 3, 2016 at 7:23 AM, Aleksander Alekseev
<a(dot)alekseev(at)postgrespro(dot)ru> wrote:
>> time pgbench -T 5 -R 0.1 -P 1 -c 2 -j 2
>
> On my laptop this command executes 25 seconds instead of 5. I'm pretty
> sure it IS a bug. Probably a minor one though.
>
> I tested this patch on Ubuntu 14.04 LTS with GCC 4.8. It applies
> cleanly on master branch (c7111d11) and solves a described problem.
> No compilation warnings. Everything else works as before.
>
> Still I wonder if code could be patched more cleanly. Instead of:
>
> if(someint)
> if(somebool)
>
> ... you should probably write:
>
> if(someint > 0)
> if(somebool == TRUE)
I think our usual style is to test Booleans directly; that is if
(somebool). But for other types, we typically include an explicit
comparison, like if (someint != 0) or if (someint > 0).
> As a side note I noticed that pgbench.c is not pgindent'ed. Since you
> are modifying this file anyway probably you cold solve this issue too?
> As a separate patch perhaps.
That's not really this patch's job.
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2016-03-03 18:20:05 | Re: POC: Cache data in GetSnapshotData() |
Previous Message | Robert Haas | 2016-03-03 18:17:20 | Re: WIP: Upper planner pathification |