pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Thomas Munro <thomas.munro@enterprisedb.com>
Cc: Heikki Linnakangas <hlinnaka@iki.fi>
Cc: Peter Geoghegan <pg@bowt.ie>
Cc: Michael Paquier <michael@paquier.xyz>
Cc: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: Adrien Nayrat <adrien.nayrat@anayrat.info>
Cc: Dmitry Dolgov <9erthalion6@gmail.com>
Cc: Tomas Vondra <tomas.vondra@2ndquadrant.com>
Cc: Vik Fearing <vik.fearing@2ndquadrant.com>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: David Rowley <david.rowley@2ndquadrant.com>
Cc: Pg Hackers <pgsql-hackers@postgresql.org>
Subject: Re: random() (was Re: New GUC to sample log queries)
Date: Fri, 28 Dec 2018 19:57:47 -0500
Message-ID: <27584.1546045067@sss.pgh.pa.us> (raw)
In-Reply-To: <CAEepm=2iTDYFafz8+P-CN84C3+hLm9aubedpFCez+m+SERKwMA@mail.gmail.com>
References: <20181129214850.kiq6mvofsgplqjdr@alvherre.pgsql>
	<3859.1545849900@sss.pgh.pa.us>
	<20181227013458.GF2106@paquier.xyz>
	<32696.1545875185@sss.pgh.pa.us>
	<CAH2-Wz=xJiy+BgU7M49L6EHSkMbJWbzbprge=AqyOC8aDXRj8A@mail.gmail.com>
	<2820.1545878340@sss.pgh.pa.us>
	<CAH2-WznuXsWmjnvbt=odKMVxpj1zutgzRb7s6Vu3VPXCjejS5g@mail.gmail.com>
	<CAEepm=1tJB2=w_GdXHRLkWQcCnFWGdmNiEdd5rupShKT=DwWyQ@mail.gmail.com>
	<9703.1545939393@sss.pgh.pa.us>
	<10913.1546038905@sss.pgh.pa.us>
	<26722.1546043812@sss.pgh.pa.us>
	<CAEepm=2iTDYFafz8+P-CN84C3+hLm9aubedpFCez+m+SERKwMA@mail.gmail.com>

Thomas Munro <thomas.munro@enterprisedb.com> 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




view thread (33+ messages)  latest in thread

Message-ID: <27584.1546045067@sss.pgh.pa.us>
Permalink:  ../27584.1546045067@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/27584.1546045067@sss.pgh.pa.us

 · 

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-hackers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, thomas.munro@enterprisedb.com, hlinnaka@iki.fi, pg@bowt.ie, michael@paquier.xyz, alvherre@2ndquadrant.com, adrien.nayrat@anayrat.info, 9erthalion6@gmail.com, tomas.vondra@2ndquadrant.com, vik.fearing@2ndquadrant.com, robertmhaas@gmail.com, david.rowley@2ndquadrant.com
  Subject: Re: random() (was Re: New GUC to sample log queries)
  In-Reply-To: <27584.1546045067@sss.pgh.pa.us>

* 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