- Notifications
You must be signed in to change notification settings - Fork4.9k
Commit38b2779
committed
Avoid possible hang during smart shutdown.
If a smart shutdown occurs just as a child is starting up, and thechild subsequently becomes a walsender, there is a race condition:the postmaster might count the exstant backends, determine that thereis one normal backend, and wait for it to die off. Had the walsendertransition already occurred before the postmaster counted, it wouldhave proceeded with the shutdown.To fix this, have each child that transforms into a walsender kickthe postmaster just after doing so, so that the state machine iscertain to advance.Fujii Masao1 parentd518d6a commit38b2779
File tree
3 files changed
+11
-2
lines changed- src
- backend
- postmaster
- replication
- include/storage
3 files changed
+11
-2
lines changedLines changed: 9 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2890 | 2890 |
| |
2891 | 2891 |
| |
2892 | 2892 |
| |
2893 |
| - | |
2894 |
| - | |
| 2893 | + | |
| 2894 | + | |
2895 | 2895 |
| |
2896 | 2896 |
| |
2897 | 2897 |
| |
| |||
4284 | 4284 |
| |
4285 | 4285 |
| |
4286 | 4286 |
| |
| 4287 | + | |
| 4288 | + | |
| 4289 | + | |
| 4290 | + | |
| 4291 | + | |
| 4292 | + | |
| 4293 | + | |
4287 | 4294 |
| |
4288 | 4295 |
| |
4289 | 4296 |
| |
|
Lines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
361 | 361 |
| |
362 | 362 |
| |
363 | 363 |
| |
| 364 | + | |
364 | 365 |
| |
365 | 366 |
| |
366 | 367 |
| |
|
Lines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
29 | 29 |
| |
30 | 30 |
| |
31 | 31 |
| |
| 32 | + | |
32 | 33 |
| |
33 | 34 |
| |
34 | 35 |
| |
|
0 commit comments
Comments
(0)