postgresql/contrib/uuid-ossp
Tom Lane c941aed96b When using the OSSP UUID library, cache its uuid_t state object.
The original coding in contrib/uuid-ossp created and destroyed a uuid_t
object (or, in some cases, even two of them) each time it was called.
This is not the intended usage: you're supposed to keep the uuid_t object
around so that the library can cache its state across uses.  (Other UUID
libraries seem to keep equivalent state behind-the-scenes in static
variables, but OSSP chose differently.)  Aside from being quite inefficient,
creating a new uuid_t loses knowledge of the previously generated UUID,
which in theory could result in duplicate V1-style UUIDs being created
on sufficiently fast machines.

On at least some platforms, creating a new uuid_t also draws some entropy
from /dev/urandom, leaving less for the rest of the system.  This seems
sufficiently unpleasant to justify back-patching this change.
2014-05-29 13:51:02 -04:00
..
expected Fix uuid-ossp regression tests based on buildfarm feedback. 2014-05-28 23:15:51 -04:00
sql Fix uuid-ossp regression tests based on buildfarm feedback. 2014-05-28 23:15:51 -04:00
.gitignore Support BSD and e2fsprogs UUID libraries alongside OSSP UUID library. 2014-05-27 19:42:08 -04:00
Makefile Support BSD and e2fsprogs UUID libraries alongside OSSP UUID library. 2014-05-27 19:42:08 -04:00
uuid-ossp--1.0.sql Fix quoting in help messages in uuid-ossp extension scripts. 2013-11-22 12:07:53 -05:00
uuid-ossp--unpackaged--1.0.sql Fix quoting in help messages in uuid-ossp extension scripts. 2013-11-22 12:07:53 -05:00
uuid-ossp.c When using the OSSP UUID library, cache its uuid_t state object. 2014-05-29 13:51:02 -04:00
uuid-ossp.control Convert contrib modules to use the extension facility. 2011-02-13 22:54:49 -05:00