Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1f2fbZ-0007iB-Tk for pgsql-committers@arkaria.postgresql.org; Sun, 01 Apr 2018 16:13:18 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1f2fbY-00044c-2z for pgsql-committers@arkaria.postgresql.org; Sun, 01 Apr 2018 16:13:16 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1f2fbX-00044T-UM for pgsql-committers@lists.postgresql.org; Sun, 01 Apr 2018 16:13:15 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1f2fbQ-0005xH-AF for pgsql-committers@lists.postgresql.org; Sun, 01 Apr 2018 16:13:15 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id w31GD3bp019795; Sun, 1 Apr 2018 12:13:03 -0400 From: Tom Lane To: Michael Paquier cc: Fabien COELHO , Teodor Sigaev , pgsql-committers@lists.postgresql.org Subject: Re: pgsql: Set random seed for pgbench. In-reply-to: <20180401072208.GB2211@paquier.xyz> References: <32390.1522464534@sss.pgh.pa.us> <10686.1522514072@sss.pgh.pa.us> <20180401072208.GB2211@paquier.xyz> Comments: In-reply-to Michael Paquier message dated "Sun, 01 Apr 2018 16:22:08 +0900" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <19793.1522599183.1@sss.pgh.pa.us> Date: Sun, 01 Apr 2018 12:13:03 -0400 Message-ID: <19794.1522599183@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Michael Paquier writes: > 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. I don't really see the point of doing more work than we've done there. No modern platform should be without pg_strong_random, and if you've actually had to use --disable-strong-random, it will not be astonishing that you lose some functionality. Also, while I personally do not see a use-case why somebody would need cryptographically strong random seeds in pgbench, if somebody did need that then they wouldn't thank us for silently falling back to a not-strong generation method if the platform is misconfigured somehow. regards, tom lane