forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit1f9158b
committed
Suppress log spam from multiple reports of SIGQUIT shutdown.
When the postmaster sends SIGQUIT to its children, there's no realneed for all the children to log that fact; the postmaster alreadymade a log entry about it, so adding perhaps dozens or hundreds ofchild-process log entries adds nothing of value. So, let's introducea new ereport level to specify "WARNING, but never send to log" anduse that for these messages.Such a change wouldn't have been desirable before commit7e784d1,because if someone manually SIGQUIT's a backend, we *do* want to logthat. But now we can tell the difference between a signal that wasissued by the postmaster and one that was not with reasonablecertainty.While we're here, also clear error_context_stack before ereport'ing,to prevent error callbacks from being invoked in the signal-handlercontext. This should reduce the odds of getting hung up while tryingto notify the client.Per a suggestion from Andres Freund.Discussion:https://postgr.es/m/20201225230331.hru3u6obyy6j53tk@alap3.anarazel.de1 parentdb6335b commit1f9158b
File tree
3 files changed
+29
-9
lines changed- src
- backend
- tcop
- utils/error
- include/utils
3 files changed
+29
-9
lines changedLines changed: 14 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2789 | 2789 |
| |
2790 | 2790 |
| |
2791 | 2791 |
| |
| 2792 | + | |
| 2793 | + | |
| 2794 | + | |
| 2795 | + | |
| 2796 | + | |
| 2797 | + | |
| 2798 | + | |
| 2799 | + | |
| 2800 | + | |
| 2801 | + | |
| 2802 | + | |
| 2803 | + | |
2792 | 2804 |
| |
2793 | 2805 |
| |
2794 | 2806 |
| |
| |||
2802 | 2814 |
| |
2803 | 2815 |
| |
2804 | 2816 |
| |
2805 |
| - | |
| 2817 | + | |
2806 | 2818 |
| |
2807 | 2819 |
| |
2808 | 2820 |
| |
| |||
2814 | 2826 |
| |
2815 | 2827 |
| |
2816 | 2828 |
| |
2817 |
| - | |
| 2829 | + | |
2818 | 2830 |
| |
2819 | 2831 |
| |
2820 | 2832 |
| |
|
Lines changed: 9 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
202 | 202 |
| |
203 | 203 |
| |
204 | 204 |
| |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
205 | 210 |
| |
206 | 211 |
| |
207 | 212 |
| |
| |||
453 | 458 |
| |
454 | 459 |
| |
455 | 460 |
| |
456 |
| - | |
| 461 | + | |
457 | 462 |
| |
458 | 463 |
| |
459 | 464 |
| |
| |||
2152 | 2157 |
| |
2153 | 2158 |
| |
2154 | 2159 |
| |
| 2160 | + | |
2155 | 2161 |
| |
2156 | 2162 |
| |
2157 | 2163 |
| |
| |||
3109 | 3115 |
| |
3110 | 3116 |
| |
3111 | 3117 |
| |
| 3118 | + | |
3112 | 3119 |
| |
3113 | 3120 |
| |
3114 | 3121 |
| |
| |||
3484 | 3491 |
| |
3485 | 3492 |
| |
3486 | 3493 |
| |
| 3494 | + | |
3487 | 3495 |
| |
3488 | 3496 |
| |
3489 | 3497 |
| |
|
Lines changed: 6 additions & 6 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
40 | 40 |
| |
41 | 41 |
| |
42 | 42 |
| |
43 |
| - | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
44 | 46 |
| |
45 | 47 |
| |
46 | 48 |
| |
47 | 49 |
| |
48 | 50 |
| |
49 | 51 |
| |
50 |
| - | |
| 52 | + | |
51 | 53 |
| |
52 |
| - | |
53 |
| - | |
54 |
| - | |
55 |
| - | |
| 54 | + | |
| 55 | + | |
56 | 56 |
| |
57 | 57 |
| |
58 | 58 |
| |
|
0 commit comments
Comments
(0)