pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Paquier <michael@paquier.xyz>
To: Fabien COELHO <coelho@cri.ensmp.fr>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Teodor Sigaev <teodor@sigaev.ru>
Cc: pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Set random seed for pgbench.
Date: Sun, 1 Apr 2018 16:22:08 +0900
Message-ID: <20180401072208.GB2211@paquier.xyz> (raw)
In-Reply-To: <alpine.DEB.2.20.1803311936450.23311@lancre>
References: <E1f0U1H-00005J-98@gemulon.postgresql.org>
	<32390.1522464534@sss.pgh.pa.us>
	<alpine.DEB.2.20.1803310828100.23311@lancre>
	<10686.1522514072@sss.pgh.pa.us>
	<alpine.DEB.2.20.1803311936450.23311@lancre>

On Sat, Mar 31, 2018 at 07:43:38PM +0200, Fabien COELHO wrote:
> Indeed, I clearly misunderstood its usage pattern. I looked at its source
> ("src/port/pg_strong_random.c") where the function is always defined and is
> documented as returning false if it does not find a strong random source, so
> I though that checking for this was enough. But indeed its
> compilation fails if no source is provided.

I have not check in details this thread so I may be saying something
stupid...  But if you are looking for a frontend implementation for
strong randoms, please extract pg_frontend_random in fe-auth-scram.c and
move it to its own file for example in src/common as a frontend-only
file.  When working on SCRAM, I recall mentioning that but Heikki has
kept the code in its current shape for simplicity.

As far as I can see, there is no reason to issue an error in
set_random_seed() either in pgbench code.
--
Michael

Attachments:

  signature.asc (application/pgp-signature, 832B) download

view thread (7+ messages)  latest in thread

Message-ID: <20180401072208.GB2211@paquier.xyz>
Permalink:  ../20180401072208.GB2211@paquier.xyz/
Also on:    postgresql.org/message-id/20180401072208.GB2211@paquier.xyz

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: michael@paquier.xyz, coelho@cri.ensmp.fr, tgl@sss.pgh.pa.us, teodor@sigaev.ru, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Set random seed for pgbench.
  In-Reply-To: <20180401072208.GB2211@paquier.xyz>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox