Re: random() (was Re: New GUC to sample log queries)

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: random() (was Re: New GUC to sample log queries)
Дата
Msg-id 27584.1546045067@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: random() (was Re: New GUC to sample log queries)  (Thomas Munro <thomas.munro@enterprisedb.com>)
Ответы Re: random() (was Re: New GUC to sample log queries)  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
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


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Thomas Munro
Дата:
Сообщение: Re: random() (was Re: New GUC to sample log queries)
Следующее
От: Kohei KaiGai
Дата:
Сообщение: Re: add_partial_path() may remove dominated path but still in use