Commit 8dc8310
committed
On Darwin, detect and report a multithreaded postmaster.
Darwin --enable-nls builds use a substitute setlocale() that may start a
thread. Buildfarm member orangutan experienced BackendList corruption
on account of different postmaster threads executing signal handlers
simultaneously. Furthermore, a multithreaded postmaster risks undefined
behavior from sigprocmask() and fork(). Emit LOG messages about the
problem and its workaround. Back-patch to 9.0 (all supported versions).1 parent 05bb4fc commit 8dc8310
File tree
5 files changed
+61
-2
lines changed- src
- backend/postmaster
- include
- port
5 files changed
+61
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19157 | 19157 | | |
19158 | 19158 | | |
19159 | 19159 | | |
19160 | | - | |
| 19160 | + | |
| 19161 | + | |
19161 | 19162 | | |
19162 | 19163 | | |
19163 | 19164 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1240 | 1240 | | |
1241 | 1241 | | |
1242 | 1242 | | |
1243 | | - | |
| 1243 | + | |
1244 | 1244 | | |
1245 | 1245 | | |
1246 | 1246 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
95 | 99 | | |
96 | 100 | | |
97 | 101 | | |
| |||
1105 | 1109 | | |
1106 | 1110 | | |
1107 | 1111 | | |
| 1112 | + | |
| 1113 | + | |
| 1114 | + | |
| 1115 | + | |
| 1116 | + | |
| 1117 | + | |
| 1118 | + | |
| 1119 | + | |
| 1120 | + | |
| 1121 | + | |
| 1122 | + | |
| 1123 | + | |
| 1124 | + | |
| 1125 | + | |
| 1126 | + | |
| 1127 | + | |
| 1128 | + | |
| 1129 | + | |
1108 | 1130 | | |
1109 | 1131 | | |
1110 | 1132 | | |
| |||
1535 | 1557 | | |
1536 | 1558 | | |
1537 | 1559 | | |
| 1560 | + | |
| 1561 | + | |
| 1562 | + | |
| 1563 | + | |
| 1564 | + | |
| 1565 | + | |
| 1566 | + | |
| 1567 | + | |
| 1568 | + | |
1538 | 1569 | | |
1539 | 1570 | | |
1540 | 1571 | | |
| |||
4209 | 4240 | | |
4210 | 4241 | | |
4211 | 4242 | | |
| 4243 | + | |
| 4244 | + | |
| 4245 | + | |
| 4246 | + | |
| 4247 | + | |
| 4248 | + | |
| 4249 | + | |
| 4250 | + | |
| 4251 | + | |
| 4252 | + | |
| 4253 | + | |
| 4254 | + | |
4212 | 4255 | | |
4213 | 4256 | | |
4214 | 4257 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
393 | 393 | | |
394 | 394 | | |
395 | 395 | | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
396 | 399 | | |
397 | 400 | | |
398 | 401 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
570 | 570 | | |
571 | 571 | | |
572 | 572 | | |
| 573 | + | |
573 | 574 | | |
574 | 575 | | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
575 | 587 | | |
576 | 588 | | |
577 | 589 | | |
| |||
0 commit comments