postgresql/src/include/postmaster
Tom Lane 93528f7b41 Avoid using PostmasterRandom() for DSM control segment ID.
Commits 470d886c3 et al intended to fix the problem that the postmaster
selected the same "random" DSM control segment ID on every start.  But
using PostmasterRandom() for that destroys the intended property that the
delay between random_start_time and random_stop_time will be unpredictable.
(Said delay is probably already more predictable than we could wish, but
that doesn't mean that reducing it by a couple orders of magnitude is OK.)
Revert the previous patch and add a comment warning against misuse of
PostmasterRandom.  Fix the original problem by calling srandom() early in
PostmasterMain, using a low-security seed that will later be overwritten
by PostmasterRandom.

Discussion: <20789.1474390434@sss.pgh.pa.us>
2016-09-23 09:54:11 -04:00
..
autovacuum.h Tweak __attribute__-wrapping macros for better pgindent results. 2015-03-26 14:03:25 -04:00
bgworker.h Pass extra data to bgworkers, and use this to fix parallel contexts. 2015-11-05 12:21:00 -05:00
bgworker_internals.h Tweak __attribute__-wrapping macros for better pgindent results. 2015-03-26 14:03:25 -04:00
bgwriter.h Tweak __attribute__-wrapping macros for better pgindent results. 2015-03-26 14:03:25 -04:00
fork_process.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
pgarch.h At promotion, archive last segment from old timeline with .partial suffix. 2015-05-08 21:59:01 +03:00
postmaster.h Avoid using PostmasterRandom() for DSM control segment ID. 2016-09-23 09:54:11 -04:00
startup.h Tweak __attribute__-wrapping macros for better pgindent results. 2015-03-26 14:03:25 -04:00
syslogger.h Tweak __attribute__-wrapping macros for better pgindent results. 2015-03-26 14:03:25 -04:00
walwriter.h Tweak __attribute__-wrapping macros for better pgindent results. 2015-03-26 14:03:25 -04:00