Re: pgbench - add pseudo-random permutation function

From: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
To: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
Cc: Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>, Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>, Thomas Munro <thomas(dot)munro(at)gmail(dot)com>, Hironobu SUZUKI <hironobu(at)interdb(dot)jp>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, David Steele <david(at)pgmasters(dot)net>
Subject: Re: pgbench - add pseudo-random permutation function
Date: 2020-01-30 18:03:46
Message-ID: 20200130180346.GA29922@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On 2020-Jan-30, Peter Eisentraut wrote:

> I read the whole thread, I still don't know what this patch is supposed to
> do. I know what the words in the subject line mean, but I don't know how
> this helps a pgbench user run better benchmarks. I feel this is also the
> sentiment expressed by others earlier in the thread. You indicated that
> this functionality makes sense to those who want this functionality, but so
> far only two people, namely the patch author and the reviewer, have
> participated in the discussion on the substance of this patch. So either
> the feature is extremely niche, or nobody understands it. I think you ought
> to take about three steps back and explain this in more basic terms, even
> just in email at first so that we can then discuss what to put into the
> documentation.

After re-reading one more time, it dawned on me that the point of this
is similar in spirit to this one:

The idea seems to be to map the int4 domain into itself, so you can use
a sequence to generate numbers that will not look like a sequence,
allowing the user to hide some properties (such as the generation rate)
that might be useful to an eavesdropper/attacker. In terms of writing
benchmarks, it seems useful to destroy all locality of access, which
changes the benchmark completely. (I'm not sure if this is something
benchmark writers really want to have.)

If I'm right, then I agree that the documentation provided with the
patch does a pretty bad job at explaining it, because until now I didn't
at all realize this is what it was.

Álvaro Herrera
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to


Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2020-01-30 18:28:00 Re: Unix-domain socket support on Windows
Previous Message Tom Lane 2020-01-30 17:57:52 Re: table partitioning and access privileges