forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitf8d4d1e
Only perform pg_strong_random init when required
The random number generator in OpenSSL 1.1.1 was redesigned to providefork safety by default, thus removing the need for calling RAND_pollafter forking to ensure that two processes cannot share the same state.Since we now support 1.1.0 as the minumum version, and 1.1.0 is beingincreasingly phased out from production use, only perform the RAND_pollinitialization for installations running 1.1.0 by checking the OpenSSLversion number.LibreSSL changed random number generator when forking OpenSSL and hasprovided fork safety since version 2.0.2.This removes the overhead of initializing the RNG for strong randomfor the vast majority of users for whom it is no longer required.Reviewed-by: Jacob Champion <jacob.champion@enterprisedb.com>Reviewed-by: Peter Eisentraut <peter@eisentraut.org>Reviewed-by: Michael Paquier <michael@paquier.xyz>Discussion:https://postgr.es/m/CA+hUKGKh7QrYzu=8yWEUJvXtMVm_CNWH1L_TLWCbZMwbi1XP2Q@mail.gmail.com1 parent90b06b5 commitf8d4d1e
1 file changed
+6
-3
lines changedLines changed: 6 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
50 | 50 |
| |
51 | 51 |
| |
52 | 52 |
| |
| 53 | + | |
53 | 54 |
| |
54 | 55 |
| |
55 | 56 |
| |
56 | 57 |
| |
57 | 58 |
| |
| 59 | + | |
58 | 60 |
| |
59 |
| - | |
60 |
| - | |
61 |
| - | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
62 | 64 |
| |
63 | 65 |
| |
| 66 | + | |
64 | 67 |
| |
65 | 68 |
| |
66 | 69 |
| |
|
0 commit comments
Comments
(0)