Re: pgbench randomness initialization

From: Andres Freund <andres(at)anarazel(dot)de>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>, PostgreSQL Developers <pgsql-hackers(at)postgresql(dot)org>, Robert Haas <robertmhaas(at)gmail(dot)com>
Subject: Re: pgbench randomness initialization
Date: 2016-04-07 13:51:57
Message-ID: 20160407135157.7hqrt5zkn5jzxaq2@alap3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2016-04-07 09:46:27 -0400, Tom Lane wrote:
> Andres Freund <andres(at)anarazel(dot)de> writes:
> > On 2016-04-07 12:25:58 +0200, Fabien COELHO wrote:
> >> So I have no mathematical doubt that changing the seed is the right default
> >> setting, thus I think that the current behavior is fine. However I'm okay if
> >> someone wants to control the randomness for some reason (maybe having "less
> >> sure" results, but quickly), so it could be allowed somehow.
>
> > There might be some statistics arguments, but I think they're pretty
> > ignoring reality.
>
> Sorry, but I think Fabien is right and you are wrong.

Given that it's 3:1 so far, you might be right...

> There is no point in having randomness in there at all if the thing is
> constrained to generate the same "random" sequence every time.

but that argument seems pretty absurd. It's obviously different to query
for different rows over a run, rather than querying the same row again
and again, in all backends. The reason we use randomness is to avoid
easily discernible patterns in querying. Without randomness, how would
you do that?

Greetings,

Andres Freund

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2016-04-07 13:55:41 Re: Using quicksort for every external sort run
Previous Message Alexander Korotkov 2016-04-07 13:50:44 Re: Move PinBuffer and UnpinBuffer to atomics