Re: PG 10: could not generate random cancel key

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: PG 10: could not generate random cancel key
Дата
Msg-id 20180717130455.GA1629@paquier.xyz
обсуждение исходный текст
Ответ на PG 10: could not generate random cancel key  (Dean Rasheed <dean.a.rasheed@gmail.com>)
Ответы Re: PG 10: could not generate random cancel key  (Dean Rasheed <dean.a.rasheed@gmail.com>)
Список pgsql-hackers
On Tue, Jul 17, 2018 at 01:33:11PM +0100, Dean Rasheed wrote:
> Looking for precedents elsewhere, I found [2] which does exactly that,
> although I'm slightly dubious about the need for the for-loop there. I
> also found a thread [3], which recommends simply doing
>
> if (RAND_status() == 0)
>     RAND_poll();
>
> which seems preferable. Attached is a patch to do this in pg_strong_random().

Checking for the return result of RAND_poll() would also be good thing
to do.  From what I read in OpenSSL code it could fail as well, and
we could combine that with a loop attempted to feed the machinery a
decided amount of times, just failing after successive failures.
--
Michael

Вложения

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

Предыдущее
От: Tomas Vondra
Дата:
Сообщение: Re: [HACKERS] PATCH: multivariate histograms and MCV lists
Следующее
От: Haribabu Kommi
Дата:
Сообщение: Re: [bug fix] Produce a crash dump before main() on Windows