Re: PG 10: could not generate random cancel key - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: PG 10: could not generate random cancel key
Date
Msg-id 20180718130109.GH8565@paquier.xyz
Whole thread Raw
In response to Re: PG 10: could not generate random cancel key  (Dean Rasheed <dean.a.rasheed@gmail.com>)
Responses Re: PG 10: could not generate random cancel key  (Dean Rasheed <dean.a.rasheed@gmail.com>)
List pgsql-hackers
On Wed, Jul 18, 2018 at 10:14:56AM +0100, Dean Rasheed wrote:
> OK, I guess that it is possible that an older version of OpenSSL
> requires RAND_poll() to be called multiple times. Here's an updated
> patch doing that (with up to 8 retries, based on the old OpenSSL
> code).

Thanks for the updated version.  This looks safer to me.  It is possible
to simplify the code by removing the external RAND_status() call and
check for RAND_status() first in the loop as per the attached.
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Libpq support to connect to standby server as priority
Next
From: Fabien COELHO
Date:
Subject: Re: [HACKERS] Re: [COMMITTERS] pgsql: Remove pgbench "progress" testpending solution of its timing is (fwd)