forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit49a91b8
committed
Avoid using PostmasterRandom() for DSM control segment ID.
Commits470d886 et al intended to fix the problem that the postmasterselected the same "random" DSM control segment ID on every start. Butusing PostmasterRandom() for that destroys the intended property that thedelay between random_start_time and random_stop_time will be unpredictable.(Said delay is probably already more predictable than we could wish, butthat 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 ofPostmasterRandom. Fix the original problem by calling srandom() early inPostmasterMain, using a low-security seed that will later be overwrittenby PostmasterRandom.Discussion: <20789.1474390434@sss.pgh.pa.us>1 parent6fa51c7 commit49a91b8
File tree
3 files changed
+17
-4
lines changed- src
- backend
- postmaster
- storage/ipc
- include/postmaster
3 files changed
+17
-4
lines changedLines changed: 16 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
403 | 403 |
| |
404 | 404 |
| |
405 | 405 |
| |
| 406 | + | |
406 | 407 |
| |
407 | 408 |
| |
408 | 409 |
| |
| |||
574 | 575 |
| |
575 | 576 |
| |
576 | 577 |
| |
| 578 | + | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
| 587 | + | |
577 | 588 |
| |
578 | 589 |
| |
579 | 590 |
| |
| |||
5099 | 5110 |
| |
5100 | 5111 |
| |
5101 | 5112 |
| |
| 5113 | + | |
| 5114 | + | |
| 5115 | + | |
| 5116 | + | |
5102 | 5117 |
| |
5103 |
| - | |
| 5118 | + | |
5104 | 5119 |
| |
5105 | 5120 |
| |
5106 | 5121 |
| |
|
Lines changed: 1 addition & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
36 | 36 |
| |
37 | 37 |
| |
38 | 38 |
| |
39 |
| - | |
40 | 39 |
| |
41 | 40 |
| |
42 | 41 |
| |
| |||
182 | 181 |
| |
183 | 182 |
| |
184 | 183 |
| |
185 |
| - | |
| 184 | + | |
186 | 185 |
| |
187 | 186 |
| |
188 | 187 |
| |
|
Lines changed: 0 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
48 | 48 |
| |
49 | 49 |
| |
50 | 50 |
| |
51 |
| - | |
52 | 51 |
| |
53 | 52 |
| |
54 | 53 |
| |
|
0 commit comments
Comments
(0)