Re: pgbench more operators & functions

From: Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, Stephen Frost <sfrost(at)snowman(dot)net>, Jeevan Ladhe <jeevan(dot)ladhe(at)enterprisedb(dot)com>, PostgreSQL Developers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pgbench more operators & functions
Date: 2016-10-04 18:12:32
Message-ID: alpine.DEB.2.20.1610041941150.24533@lancre
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


Hello Robert,

> I think it's pretty clear that this patch is not Ready for Committer,

As a reviewer, I do not know when to decide to put something as "ready".
My opinion is that it is a matter of the reviewer to decide. Whether some
consensus is actually reached, or whether a committer is going to disagree
later on, cannot be helped.

> because there's no consensus that we want this, and like Tom and
> Stephen, I'd argue that there are large parts of it we don't want.

> The documentation in the latest patch version mentions XOR and IF
> which we definitely don't want because there is no similar thing in
> SQL,

I have removed these and put CASE WHEN THEN ELSE END instead in v6.

> but in addition to that, I don't think much of an argument has
> been made that any of this is actually useful.

In the TPC-B benchmark, some conditional is needed because under some
probability an account must be chosen in the *same* branch as the teller,
otherwise in the *other* branches.

> I'm skeptical about the notion that giving pgbench a vast repertoire of
> mathematical functions is a good idea. What does that actually let us
> do that is useful and not possible today?

I do not see a vast "repertoire" of functions. There are "usual" int
operators, logical operators, and a few functions.

About the one added in this patch:

bitwise operations: I have seen some use to create a non uniform random
from a random one. Once one operator is put in, there is no reason not to
put the others...

exp & ln: could be used to tweak distributions.

conditional: see above.

I have not put trigonometric functions because I could not think of a
use in a benchmarking context.

> I'm happy to see pgbench made better in a variety of ways, but I don't
> really see why that particular thing is useful. Perhaps I'm just
> missing something.

I'm trying to add features that are IMO useful for benchmarking.

When doing so, someone says "hay, you put a double expression, you must
put double variables". Although I can see the point of double expressions
for passing ints into some transformations, I can't see a double variable
really useful in any benchmark, but there it is, it is a side effect of
the process, and it is somehow to have orthogonal features.

--
Fabien.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Jeff Janes 2016-10-04 18:25:24 Re: Cache Hash Index meta page.
Previous Message Robert Haas 2016-10-04 17:50:37 Re: Question / requests.