forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitd18f667
committed
Initialize random() in bootstrap/stand-alone postgres and in initdb.
This removes a difference between the standard IsUnderPostmasterexecution environment and that of --boot and --single. In a stand-alonebackend, "SELECT random()" always started at the same seed.On a system capable of using posix shared memory, initdb could stillconclude "selecting dynamic shared memory implementation ... sysv".Crashed --boot or --single postgres processes orphaned shared memoryobjects having names that collided with the not-actually-random namesthat initdb probed. The sysv fallback appeared after ten crashes of--boot or --single postgres. Since --boot and --single are rare inproduction use, systems used for PostgreSQL development are theprincipal candidate to notice this symptom.Back-patch to 9.3 (all supported versions). PostgreSQL 9.4 introduceddynamic shared memory, but 9.3 does share the "SELECT random()" problem.Reviewed by Tom Lane and Kyotaro HORIGUCHI.Discussion:https://postgr.es/m/20180915221546.GA3159382@rfd.leadboat.com1 parent73a6005 commitd18f667
2 files changed
+11
-0
lines changedLines changed: 8 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
325 | 325 |
| |
326 | 326 |
| |
327 | 327 |
| |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
328 | 336 |
| |
329 | 337 |
| |
330 | 338 |
| |
|
Lines changed: 3 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
923 | 923 |
| |
924 | 924 |
| |
925 | 925 |
| |
| 926 | + | |
| 927 | + | |
| 928 | + | |
926 | 929 |
| |
927 | 930 |
| |
928 | 931 |
| |
|
0 commit comments
Comments
(0)