[pgpool-committers: 10500] pgpool: Replace PostmasterRandom() with pg_strong_random().

Tatsuo Ishii ishii at postgresql.org
Tue May 20 09:50:04 JST 2025


Replace PostmasterRandom() with pg_strong_random().

Our PostmasterRandmon() was imported from PostgreSQL long time ago (in
2016). In the same year PostgreSQL replaced PostmasterRandmon() with
pg_strong_random()(src/port/pg_strong_random.c). This commit follows
it.

pg_strong_random() looks better than PostmasterRandmon(), since it's
more secure and portable. Moreover no initialization is necessary.

Reviewed-by: Martijn van Duren <pgpool at list.imperialat.at>
Discussion: [pgpool-hackers: 4588] Shuffle random functions and use better random numbers
https://www.pgpool.net/pipermail/pgpool-hackers/2025-May/004589.html

Branch
------
master

Details
-------
https://git.postgresql.org/gitweb?p=pgpool2.git;a=commitdiff;h=7abdd48ece6630eb2c376e865d39500e49b33d8c

Modified Files
--------------
src/Makefile.am              |   3 +-
src/auth/pool_auth.c         |  65 ++-------------
src/include/pool.h           |   4 +
src/utils/pg_strong_random.c | 185 +++++++++++++++++++++++++++++++++++++++++++
4 files changed, 198 insertions(+), 59 deletions(-)



More information about the pgpool-committers mailing list