postgresql/src/backend/tcop
Tom Lane 3804539e48 Replace random(), pg_erand48(), etc with a better PRNG API and algorithm.
Standardize on xoroshiro128** as our basic PRNG algorithm, eliminating
a bunch of platform dependencies as well as fundamentally-obsolete PRNG
code.  In addition, this API replacement will ease replacing the
algorithm again in future, should that become necessary.

xoroshiro128** is a few percent slower than the drand48 family,
but it can produce full-width 64-bit random values not only 48-bit,
and it should be much more trustworthy.  It's likely to be noticeably
faster than the platform's random(), depending on which platform you
are thinking about; and we can have non-global state vectors easily,
unlike with random().  It is not cryptographically strong, but neither
are the functions it replaces.

Fabien Coelho, reviewed by Dean Rasheed, Aleksander Alekseev, and myself

Discussion: https://postgr.es/m/alpine.DEB.2.22.394.2105241211230.165418@pseudo
2021-11-28 21:33:07 -05:00
..
cmdtag.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
dest.c Remove server and libpq support for old FE/BE protocol version 2. 2021-03-04 10:45:55 +02:00
fastpath.c Message style improvements 2021-06-28 08:36:44 +02:00
Makefile Represent command completion tags as structs 2020-03-02 18:19:51 -03:00
postgres.c Replace random(), pg_erand48(), etc with a better PRNG API and algorithm. 2021-11-28 21:33:07 -05:00
pquery.c Fix Portal snapshot tracking to handle subtransactions properly. 2021-10-01 11:10:12 -04:00
utility.c Add pg_checkpointer predefined role for CHECKPOINT command. 2021-11-09 16:59:14 -08:00