forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit44fc6e2
committed
Centralize setup of SIGQUIT handling for postmaster child processes.
We decided that the policy established in commit7634bd4 forthe bgwriter, checkpointer, walwriter, and walreceiver processes,namely that they should accept SIGQUIT at all times, really oughtto apply uniformly to all postmaster children. Therefore, getrid of the duplicative and inconsistent per-process code forestablishing that signal handler and removing SIGQUIT from BlockSig.Instead, make InitPostmasterChild do it.The handler set up by InitPostmasterChild is SignalHandlerForCrashExit,which just summarily does _exit(2). In interactive backends, wealmost immediately replace that with quickdie, since we would preferto try to tell the client that we're dying. However, this patch ischanging the behavior of autovacuum (both launcher and workers), aswell as walsenders. Those processes formerly also used quickdie,but AFAICS that was just mindless copy-and-paste: they don't haveany interactive client that's likely to benefit from being told this.The stats collector continues to be an outlier, in that it thinksSIGQUIT means normal exit. That should probably be changed forconsistency, but there's another patch set where that's beingdealt with, so I didn't do so here.Discussion:https://postgr.es/m/644875.1599933441@sss.pgh.pa.us1 parent2000b6c commit44fc6e2
File tree
12 files changed
+51
-49
lines changed- src/backend
- postmaster
- replication
- tcop
- utils/init
12 files changed
+51
-49
lines changedLines changed: 10 additions & 8 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
454 | 454 |
| |
455 | 455 |
| |
456 | 456 |
| |
| 457 | + | |
457 | 458 |
| |
458 |
| - | |
459 | 459 |
| |
460 | 460 |
| |
461 | 461 |
| |
| |||
498 | 498 |
| |
499 | 499 |
| |
500 | 500 |
| |
501 |
| - | |
502 |
| - | |
503 |
| - | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
504 | 505 |
| |
505 | 506 |
| |
506 | 507 |
| |
| |||
1531 | 1532 |
| |
1532 | 1533 |
| |
1533 | 1534 |
| |
1534 |
| - | |
| 1535 | + | |
| 1536 | + | |
1535 | 1537 |
| |
1536 | 1538 |
| |
1537 | 1539 |
| |
| |||
1562 | 1564 |
| |
1563 | 1565 |
| |
1564 | 1566 |
| |
1565 |
| - | |
1566 |
| - | |
1567 |
| - | |
| 1567 | + | |
| 1568 | + | |
| 1569 | + | |
1568 | 1570 |
| |
1569 | 1571 |
| |
1570 | 1572 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
731 | 731 |
| |
732 | 732 |
| |
733 | 733 |
| |
| 734 | + | |
734 | 735 |
| |
735 | 736 |
| |
736 |
| - | |
737 | 737 |
| |
738 | 738 |
| |
739 | 739 |
| |
|
Lines changed: 1 addition & 5 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
104 | 104 |
| |
105 | 105 |
| |
106 | 106 |
| |
107 |
| - | |
| 107 | + | |
108 | 108 |
| |
109 | 109 |
| |
110 | 110 |
| |
| |||
115 | 115 |
| |
116 | 116 |
| |
117 | 117 |
| |
118 |
| - | |
119 |
| - | |
120 |
| - | |
121 |
| - | |
122 | 118 |
| |
123 | 119 |
| |
124 | 120 |
| |
|
Lines changed: 1 addition & 5 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
198 | 198 |
| |
199 | 199 |
| |
200 | 200 |
| |
201 |
| - | |
| 201 | + | |
202 | 202 |
| |
203 | 203 |
| |
204 | 204 |
| |
| |||
209 | 209 |
| |
210 | 210 |
| |
211 | 211 |
| |
212 |
| - | |
213 |
| - | |
214 |
| - | |
215 |
| - | |
216 | 212 |
| |
217 | 213 |
| |
218 | 214 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
228 | 228 |
| |
229 | 229 |
| |
230 | 230 |
| |
231 |
| - | |
| 231 | + | |
232 | 232 |
| |
233 | 233 |
| |
234 | 234 |
| |
|
Lines changed: 2 additions & 6 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
4355 | 4355 |
| |
4356 | 4356 |
| |
4357 | 4357 |
| |
4358 |
| - | |
| 4358 | + | |
4359 | 4359 |
| |
4360 | 4360 |
| |
4361 | 4361 |
| |
| |||
4435 | 4435 |
| |
4436 | 4436 |
| |
4437 | 4437 |
| |
4438 |
| - | |
| 4438 | + | |
4439 | 4439 |
| |
4440 | 4440 |
| |
4441 | 4441 |
| |
| |||
4983 | 4983 |
| |
4984 | 4984 |
| |
4985 | 4985 |
| |
4986 |
| - | |
4987 |
| - | |
4988 |
| - | |
4989 |
| - | |
4990 | 4986 |
| |
4991 | 4987 |
| |
4992 | 4988 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
175 | 175 |
| |
176 | 176 |
| |
177 | 177 |
| |
178 |
| - | |
| 178 | + | |
179 | 179 |
| |
180 | 180 |
| |
181 | 181 |
| |
|
Lines changed: 1 addition & 5 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
101 | 101 |
| |
102 | 102 |
| |
103 | 103 |
| |
104 |
| - | |
| 104 | + | |
105 | 105 |
| |
106 | 106 |
| |
107 | 107 |
| |
| |||
112 | 112 |
| |
113 | 113 |
| |
114 | 114 |
| |
115 |
| - | |
116 |
| - | |
117 |
| - | |
118 |
| - | |
119 | 115 |
| |
120 | 116 |
| |
121 | 117 |
| |
|
Lines changed: 1 addition & 5 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
270 | 270 |
| |
271 | 271 |
| |
272 | 272 |
| |
273 |
| - | |
| 273 | + | |
274 | 274 |
| |
275 | 275 |
| |
276 | 276 |
| |
| |||
279 | 279 |
| |
280 | 280 |
| |
281 | 281 |
| |
282 |
| - | |
283 |
| - | |
284 |
| - | |
285 |
| - | |
286 | 282 |
| |
287 | 283 |
| |
288 | 284 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
3041 | 3041 |
| |
3042 | 3042 |
| |
3043 | 3043 |
| |
3044 |
| - | |
| 3044 | + | |
3045 | 3045 |
| |
3046 | 3046 |
| |
3047 | 3047 |
| |
|
Lines changed: 5 additions & 11 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
3820 | 3820 |
| |
3821 | 3821 |
| |
3822 | 3822 |
| |
3823 |
| - | |
| 3823 | + | |
| 3824 | + | |
3824 | 3825 |
| |
3825 | 3826 |
| |
3826 | 3827 |
| |
| |||
3842 | 3843 |
| |
3843 | 3844 |
| |
3844 | 3845 |
| |
| 3846 | + | |
| 3847 | + | |
| 3848 | + | |
3845 | 3849 |
| |
3846 | 3850 |
| |
3847 | 3851 |
| |
| |||
3871 | 3875 |
| |
3872 | 3876 |
| |
3873 | 3877 |
| |
3874 |
| - | |
3875 |
| - | |
3876 |
| - | |
3877 |
| - | |
3878 |
| - | |
3879 |
| - | |
3880 |
| - | |
3881 |
| - | |
3882 |
| - | |
3883 |
| - | |
3884 | 3878 |
| |
3885 | 3879 |
| |
3886 | 3880 |
| |
|
Lines changed: 26 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
32 | 32 |
| |
33 | 33 |
| |
34 | 34 |
| |
| 35 | + | |
35 | 36 |
| |
36 | 37 |
| |
37 | 38 |
| |
38 | 39 |
| |
| 40 | + | |
39 | 41 |
| |
40 | 42 |
| |
41 | 43 |
| |
| |||
133 | 135 |
| |
134 | 136 |
| |
135 | 137 |
| |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
136 | 155 |
| |
137 | 156 |
| |
138 | 157 |
| |
| |||
155 | 174 |
| |
156 | 175 |
| |
157 | 176 |
| |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
158 | 184 |
| |
159 | 185 |
| |
160 | 186 |
| |
|
0 commit comments
Comments
(0)