pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Avoid using PostmasterRandom() for DSM control segment ID. 4+ messages / 1 participants [nested] [flat]
* pgsql: Avoid using PostmasterRandom() for DSM control segment ID. @ 2016-09-23 13:54 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 4+ messages in thread From: Tom Lane @ 2016-09-23 13:54 UTC (permalink / raw) To: pgsql-committers 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> Branch ------ REL9_6_STABLE Details ------- http://git.postgresql.org/pg/commitdiff/b251379fb44b4893624999f1ba00986c029f11cf Modified Files -------------- src/backend/postmaster/postmaster.c | 17 ++++++++++++++++- src/backend/storage/ipc/dsm.c | 3 +-- src/include/postmaster/postmaster.h | 1 - 3 files changed, 17 insertions(+), 4 deletions(-) -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers ^ permalink raw reply [nested|flat] 4+ messages in thread
* pgsql: Avoid using PostmasterRandom() for DSM control segment ID. @ 2016-09-23 13:54 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 4+ messages in thread From: Tom Lane @ 2016-09-23 13:54 UTC (permalink / raw) To: pgsql-committers 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> Branch ------ REL9_5_STABLE Details ------- http://git.postgresql.org/pg/commitdiff/93528f7b41419d4c690ab83f45912e01281a590c Modified Files -------------- src/backend/postmaster/postmaster.c | 17 ++++++++++++++++- src/backend/storage/ipc/dsm.c | 3 +-- src/include/postmaster/postmaster.h | 1 - 3 files changed, 17 insertions(+), 4 deletions(-) -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers ^ permalink raw reply [nested|flat] 4+ messages in thread
* pgsql: Avoid using PostmasterRandom() for DSM control segment ID. @ 2016-09-23 13:54 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 4+ messages in thread From: Tom Lane @ 2016-09-23 13:54 UTC (permalink / raw) To: pgsql-committers 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> Branch ------ master Details ------- http://git.postgresql.org/pg/commitdiff/49a91b88e6c4afb840745c78942dd99ce125a6d6 Modified Files -------------- src/backend/postmaster/postmaster.c | 17 ++++++++++++++++- src/backend/storage/ipc/dsm.c | 3 +-- src/include/postmaster/postmaster.h | 1 - 3 files changed, 17 insertions(+), 4 deletions(-) -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers ^ permalink raw reply [nested|flat] 4+ messages in thread
* pgsql: Avoid using PostmasterRandom() for DSM control segment ID. @ 2016-09-23 13:54 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 4+ messages in thread From: Tom Lane @ 2016-09-23 13:54 UTC (permalink / raw) To: pgsql-committers 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> Branch ------ REL9_4_STABLE Details ------- http://git.postgresql.org/pg/commitdiff/32cdf680f19a3c995da83cbef2741288b0549a7d Modified Files -------------- src/backend/postmaster/postmaster.c | 17 ++++++++++++++++- src/backend/storage/ipc/dsm.c | 3 +-- src/include/postmaster/postmaster.h | 1 - 3 files changed, 17 insertions(+), 4 deletions(-) -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers ^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2016-09-23 13:54 UTC | newest] Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2016-09-23 13:54 pgsql: Avoid using PostmasterRandom() for DSM control segment ID. Tom Lane <tgl@sss.pgh.pa.us> 2016-09-23 13:54 pgsql: Avoid using PostmasterRandom() for DSM control segment ID. Tom Lane <tgl@sss.pgh.pa.us> 2016-09-23 13:54 pgsql: Avoid using PostmasterRandom() for DSM control segment ID. Tom Lane <tgl@sss.pgh.pa.us> 2016-09-23 13:54 pgsql: Avoid using PostmasterRandom() for DSM control segment ID. Tom Lane <tgl@sss.pgh.pa.us>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox