Re: Move OpenSSL random under USE_OPENSSL_RANDOM - Mailing list pgsql-hackers

From Magnus Hagander
Subject Re: Move OpenSSL random under USE_OPENSSL_RANDOM
Date
Msg-id CABUevEwxaKcy9wXepCtQj2y2DTeC4sA1h4T3+UN6-o9vvOYcPA@mail.gmail.com
Whole thread Raw
In response to Re: Move OpenSSL random under USE_OPENSSL_RANDOM  (Michael Paquier <michael@paquier.xyz>)
Responses Re: Move OpenSSL random under USE_OPENSSL_RANDOM  (Michael Paquier <michael@paquier.xyz>)
List pgsql-hackers
On Thu, Nov 19, 2020 at 4:34 AM Michael Paquier <michael@paquier.xyz> wrote:
>
> On Wed, Nov 18, 2020 at 10:43:35AM +0100, Daniel Gustafsson wrote:
> > While it does simplify configure.ac, I'm just not a fan of the strict ordering
> > which is required without the labels even implying it.  But that might just be
> > my personal preference.
>
> I just looked at that, and the attached seems more intuitive to me.
> There is more code removed, but not that much either.

First -- your patch mi9sses the comment in front of pg_strong_random
which still says configure will set the USE_*_RANDOM macros.

That said, I agree with daniel that it's a bit "scary" that it's the
order of ifdefs that now decide on the whole thing, especially since
there are two sets of those (one in the init function, one in the
random one), which could potentially end up out of order if someone
makes a mistake.

I'm thinking the code might get a lot cleaner if we just make a single
set of ifdefs, even if that means repeating the function header. In
theory we could put them in different *.c files as well, but that
seems overkill given how tiny they are.

Patch is the same as your v3 in all parts except for the
pg_strong_random.c changes.

In summary, here's my suggestion for color of the bikeshed.


--
 Magnus Hagander
 Me: https://www.hagander.net/
 Work: https://www.redpill-linpro.com/

Attachment

pgsql-hackers by date:

Previous
From: Dean Rasheed
Date:
Subject: Re: Additional improvements to extended statistics
Next
From: "osumi.takamichi@fujitsu.com"
Date:
Subject: RE: Disable WAL logging to speed up data loading