Commit f0b7ab7
committed
postmaster: Don't repeatedly transition to crashing state
Previously HandleChildCrash() skipped logging and signalling child exits if
already in an immediate shutdown or in FatalError state, but still
transitioned server state in response to a crash. That's redundant.
In the other place we transition to FatalError, we do take care to not do so
when already in FatalError state.
To make it easier to combine different paths for entering FatalError state,
only do so once in HandleChildCrash().
Reviewed-by: Bertrand Drouvot <[email protected]>
Discussion: https://postgr.es/m/kgng5nrvnlv335evmsuvpnh354rw7qyazl73kdysev2cr2v5zu@m3cfzxicm5kp1 parent d239c1a commit f0b7ab7
1 file changed
+8
-14
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2685 | 2685 | | |
2686 | 2686 | | |
2687 | 2687 | | |
2688 | | - | |
2689 | | - | |
2690 | 2688 | | |
2691 | 2689 | | |
2692 | 2690 | | |
2693 | 2691 | | |
2694 | 2692 | | |
2695 | 2693 | | |
2696 | 2694 | | |
2697 | | - | |
| 2695 | + | |
| 2696 | + | |
2698 | 2697 | | |
2699 | | - | |
2700 | | - | |
2701 | | - | |
2702 | | - | |
2703 | | - | |
2704 | | - | |
2705 | | - | |
| 2698 | + | |
| 2699 | + | |
| 2700 | + | |
| 2701 | + | |
2706 | 2702 | | |
2707 | 2703 | | |
2708 | 2704 | | |
| |||
2711 | 2707 | | |
2712 | 2708 | | |
2713 | 2709 | | |
2714 | | - | |
2715 | | - | |
| 2710 | + | |
2716 | 2711 | | |
2717 | | - | |
2718 | | - | |
| 2712 | + | |
2719 | 2713 | | |
2720 | 2714 | | |
2721 | 2715 | | |
| |||
0 commit comments