aboutsummaryrefslogtreecommitdiff
path: root/src/backend/executor/execParallel.c
diff options
context:
space:
mode:
authorDean Rasheed <dean.a.rasheed@gmail.com>2018-07-20 08:58:37 +0100
committerDean Rasheed <dean.a.rasheed@gmail.com>2018-07-20 08:58:37 +0100
commit821200405cc3f25fda28c5f58d17d640e25559b8 (patch)
treebe8dcb0fbd453c558060bfa6f30f36602f288637 /src/backend/executor/execParallel.c
parent2131d4501f9472ed3714970e45485e5e892615e8 (diff)
downloadpostgresql-821200405cc3f25fda28c5f58d17d640e25559b8.tar.gz
postgresql-821200405cc3f25fda28c5f58d17d640e25559b8.zip
Guard against rare RAND_bytes() failures in pg_strong_random().
When built using OpenSSL, pg_strong_random() uses RAND_bytes() to generate the random number. On very rare occasions that can fail, if its PRNG has not been seeded with enough data. Additionally, once it does fail, all subsequent calls will also fail until more seed data is added. Since this is required during backend startup, this can result in all new backends failing to start until a postmaster restart. Guard against that by checking the state of OpenSSL's PRNG using RAND_status(), and if necessary (very rarely), seeding it using RAND_poll(). Back-patch to v10, where pg_strong_random() was introduced. Dean Rasheed and Michael Paquier. Discussion: https://postgr.es/m/CAEZATCXMtxbzSAvyKKk5uCRf9pNt4UV%2BF_5v%3DgLfJUuPxU4Ytg%40mail.gmail.com
Diffstat (limited to 'src/backend/executor/execParallel.c')
0 files changed, 0 insertions, 0 deletions