Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gd2xO-00065u-DX for pgsql-hackers@arkaria.postgresql.org; Sat, 29 Dec 2018 00:58:26 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gd2xL-0006SM-Mw for pgsql-hackers@arkaria.postgresql.org; Sat, 29 Dec 2018 00:58:23 +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_SHA1:256) (Exim 4.89) (envelope-from ) id 1gd2xL-0006SF-Fc for pgsql-hackers@lists.postgresql.org; Sat, 29 Dec 2018 00:58:23 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gd2xE-0000Kv-V5 for pgsql-hackers@postgresql.org; Sat, 29 Dec 2018 00:58:22 +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 wBT0vlno027585; Fri, 28 Dec 2018 19:57:47 -0500 From: Tom Lane To: Thomas Munro cc: Heikki Linnakangas , Peter Geoghegan , Michael Paquier , Alvaro Herrera , Adrien Nayrat , Dmitry Dolgov <9erthalion6@gmail.com>, Tomas Vondra , Vik Fearing , Robert Haas , David Rowley , Pg Hackers Subject: Re: random() (was Re: New GUC to sample log queries) In-reply-to: References: <20181129214850.kiq6mvofsgplqjdr@alvherre.pgsql> <3859.1545849900@sss.pgh.pa.us> <20181227013458.GF2106@paquier.xyz> <32696.1545875185@sss.pgh.pa.us> <2820.1545878340@sss.pgh.pa.us> <9703.1545939393@sss.pgh.pa.us> <10913.1546038905@sss.pgh.pa.us> <26722.1546043812@sss.pgh.pa.us> Comments: In-reply-to Thomas Munro message dated "Sat, 29 Dec 2018 13:45:59 +1300" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <27583.1546045067.1@sss.pgh.pa.us> Date: Fri, 28 Dec 2018 19:57:47 -0500 Message-ID: <27584.1546045067@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Thomas Munro writes: > I was going to suggest that we might be able to use a single > not-visible-to-users number that is mixed into the existing recipe, so > that we only ever read urandom once for the cluster. Yeah, I was thinking along similar lines, but there's a problem: InitProcessGlobals runs before an EXEC_BACKEND child has reconnected to shared memory, so there's no cheap way to pass state to it. No doubt there are ways around that, but I'd just as soon avoid adding complexity here. If we broke it somehow, the likely results would be silent failure of the per-process seed to be random, which might escape detection for a long time. > But it sounds > like it's not a problem, and it's probably better to just pass the > whole problem over to the OS. Yeah, that's what I'm thinking. regards, tom lane