forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit9abb2bf
committed
In the postmaster, rely on the signal infrastructure to block signals.
POSIX sigaction(2) can be told to block a set of signals while asignal handler executes. Make use of that instead of manuallyblocking and unblocking signals in the postmaster's signal handlers.This should save a few cycles, and it also prevents recursiveinvocation of signal handlers when many signals arrive in closesuccession. We have seen buildfarm failures that seem to be due topostmaster stack overflow caused by such recursion (exacerbated bya Linux PPC64 kernel bug).This doesn't change anything about the way that it works on Windows.Somebody might consider adjusting port/win32/signal.c to let it worksimilarly, but I'm not in a position to do that.For the moment, just apply to HEAD. Possibly we should considerback-patching this, but it'd be good to let it age awhile first.Discussion:https://postgr.es/m/14878.1570820201@sss.pgh.pa.us1 parentf38291e commit9abb2bf
File tree
5 files changed
+116
-57
lines changed- src
- backend
- libpq
- postmaster
- include
- libpq
- port
5 files changed
+116
-57
lines changedLines changed: 49 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
95 | 95 |
| |
96 | 96 |
| |
97 | 97 |
| |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + |
Lines changed: 64 additions & 23 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
606 | 606 |
| |
607 | 607 |
| |
608 | 608 |
| |
609 |
| - | |
610 |
| - | |
611 |
| - | |
612 |
| - | |
613 |
| - | |
614 |
| - | |
615 |
| - | |
616 |
| - | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
617 | 628 |
| |
618 | 629 |
| |
619 | 630 |
| |
| |||
625 | 636 |
| |
626 | 637 |
| |
627 | 638 |
| |
628 |
| - | |
629 |
| - | |
630 |
| - | |
631 |
| - | |
632 |
| - | |
633 |
| - | |
634 |
| - | |
635 |
| - | |
636 |
| - | |
637 |
| - | |
638 |
| - | |
639 |
| - | |
| 639 | + | |
| 640 | + | |
| 641 | + | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
| 645 | + | |
| 646 | + | |
| 647 | + | |
| 648 | + | |
640 | 649 |
| |
641 | 650 |
| |
642 | 651 |
| |
| |||
646 | 655 |
| |
647 | 656 |
| |
648 | 657 |
| |
649 |
| - | |
| 658 | + | |
650 | 659 |
| |
651 | 660 |
| |
652 |
| - | |
| 661 | + | |
653 | 662 |
| |
654 | 663 |
| |
655 | 664 |
| |
656 | 665 |
| |
657 |
| - | |
| 666 | + | |
658 | 667 |
| |
659 | 668 |
| |
660 | 669 |
| |
| |||
2640 | 2649 |
| |
2641 | 2650 |
| |
2642 | 2651 |
| |
| 2652 | + | |
| 2653 | + | |
| 2654 | + | |
| 2655 | + | |
| 2656 | + | |
2643 | 2657 |
| |
| 2658 | + | |
2644 | 2659 |
| |
2645 | 2660 |
| |
2646 | 2661 |
| |
| |||
2700 | 2715 |
| |
2701 | 2716 |
| |
2702 | 2717 |
| |
| 2718 | + | |
2703 | 2719 |
| |
| 2720 | + | |
2704 | 2721 |
| |
2705 | 2722 |
| |
2706 | 2723 |
| |
| |||
2714 | 2731 |
| |
2715 | 2732 |
| |
2716 | 2733 |
| |
| 2734 | + | |
| 2735 | + | |
| 2736 | + | |
| 2737 | + | |
| 2738 | + | |
2717 | 2739 |
| |
| 2740 | + | |
2718 | 2741 |
| |
2719 | 2742 |
| |
2720 | 2743 |
| |
| |||
2880 | 2903 |
| |
2881 | 2904 |
| |
2882 | 2905 |
| |
| 2906 | + | |
2883 | 2907 |
| |
| 2908 | + | |
2884 | 2909 |
| |
2885 | 2910 |
| |
2886 | 2911 |
| |
| |||
2895 | 2920 |
| |
2896 | 2921 |
| |
2897 | 2922 |
| |
| 2923 | + | |
| 2924 | + | |
| 2925 | + | |
| 2926 | + | |
| 2927 | + | |
2898 | 2928 |
| |
| 2929 | + | |
2899 | 2930 |
| |
2900 | 2931 |
| |
2901 | 2932 |
| |
| |||
3212 | 3243 |
| |
3213 | 3244 |
| |
3214 | 3245 |
| |
| 3246 | + | |
3215 | 3247 |
| |
| 3248 | + | |
3216 | 3249 |
| |
3217 | 3250 |
| |
3218 | 3251 |
| |
| |||
5114 | 5147 |
| |
5115 | 5148 |
| |
5116 | 5149 |
| |
| 5150 | + | |
| 5151 | + | |
| 5152 | + | |
| 5153 | + | |
| 5154 | + | |
5117 | 5155 |
| |
| 5156 | + | |
5118 | 5157 |
| |
5119 | 5158 |
| |
5120 | 5159 |
| |
| |||
5272 | 5311 |
| |
5273 | 5312 |
| |
5274 | 5313 |
| |
| 5314 | + | |
5275 | 5315 |
| |
| 5316 | + | |
5276 | 5317 |
| |
5277 | 5318 |
| |
5278 | 5319 |
| |
|
Lines changed: 3 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
36 | 36 |
| |
37 | 37 |
| |
38 | 38 |
| |
| 39 | + | |
| 40 | + | |
| 41 | + | |
39 | 42 |
|
Lines changed: 0 additions & 5 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
525 | 525 |
| |
526 | 526 |
| |
527 | 527 |
| |
528 |
| - | |
529 |
| - | |
530 |
| - | |
531 |
| - | |
532 |
| - | |
533 | 528 |
| |
534 | 529 |
| |
535 | 530 |
| |
|
Lines changed: 0 additions & 29 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
58 | 58 |
| |
59 | 59 |
| |
60 | 60 |
| |
61 |
| - | |
62 |
| - | |
63 |
| - | |
64 |
| - | |
65 |
| - | |
66 |
| - | |
67 |
| - | |
68 |
| - | |
69 |
| - | |
70 |
| - | |
71 |
| - | |
72 |
| - | |
73 |
| - | |
74 |
| - | |
75 |
| - | |
76 |
| - | |
77 |
| - | |
78 |
| - | |
79 |
| - | |
80 |
| - | |
81 |
| - | |
82 |
| - | |
83 |
| - | |
84 |
| - | |
85 |
| - | |
86 |
| - | |
87 |
| - | |
88 |
| - | |
89 |
| - | |
90 | 61 |
|
0 commit comments
Comments
(0)