forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit3ad0728
committed
On systems that have setsid(2) (which should be just about everything except
Windows), arrange for each postmaster child process to be its own processgroup leader, and deliver signals SIGINT, SIGTERM, SIGQUIT to the wholeprocess group not only the direct child process. This provides saner behaviorfor archive and recovery scripts; in particular, it's possible to shut down awarm-standby recovery server using "pg_ctl stop -m immediate", since deliveryof SIGQUIT to the startup subprocess will result in killing the waitingrecovery_command. Also, this makes Query Cancel and statement_timeout applyto scripts being run from backends via system(). (There is no support in thecore backend for that, but it's widely done using untrusted PLs.) Per gripefrom Stephen Harris and subsequent discussion.1 parentde59715 commit3ad0728
File tree
11 files changed
+204
-48
lines changed- src/backend
- access/transam
- bootstrap
- postmaster
- storage/lmgr
- tcop
- utils/adt
11 files changed
+204
-48
lines changedLines changed: 21 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
7 | 7 |
| |
8 | 8 |
| |
9 | 9 |
| |
10 |
| - | |
| 10 | + | |
11 | 11 |
| |
12 | 12 |
| |
13 | 13 |
| |
| |||
18 | 18 |
| |
19 | 19 |
| |
20 | 20 |
| |
21 |
| - | |
22 | 21 |
| |
23 | 22 |
| |
| 23 | + | |
| 24 | + | |
24 | 25 |
| |
25 | 26 |
| |
26 | 27 |
| |
| |||
2373 | 2374 |
| |
2374 | 2375 |
| |
2375 | 2376 |
| |
| 2377 | + | |
2376 | 2378 |
| |
2377 | 2379 |
| |
2378 | 2380 |
| |
| |||
2516 | 2518 |
| |
2517 | 2519 |
| |
2518 | 2520 |
| |
2519 |
| - | |
| 2521 | + | |
2520 | 2522 |
| |
2521 | 2523 |
| |
2522 | 2524 |
| |
2523 | 2525 |
| |
| 2526 | + | |
| 2527 | + | |
| 2528 | + | |
| 2529 | + | |
| 2530 | + | |
| 2531 | + | |
| 2532 | + | |
| 2533 | + | |
| 2534 | + | |
| 2535 | + | |
| 2536 | + | |
| 2537 | + | |
| 2538 | + | |
2524 | 2539 |
| |
2525 |
| - | |
| 2540 | + | |
| 2541 | + | |
| 2542 | + | |
2526 | 2543 |
| |
2527 | 2544 |
| |
2528 | 2545 |
| |
|
Lines changed: 10 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
8 | 8 |
| |
9 | 9 |
| |
10 | 10 |
| |
11 |
| - | |
| 11 | + | |
12 | 12 |
| |
13 | 13 |
| |
14 | 14 |
| |
| |||
500 | 500 |
| |
501 | 501 |
| |
502 | 502 |
| |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
503 | 512 |
| |
504 | 513 |
| |
505 | 514 |
| |
|
Lines changed: 12 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
10 | 10 |
| |
11 | 11 |
| |
12 | 12 |
| |
13 |
| - | |
| 13 | + | |
14 | 14 |
| |
15 | 15 |
| |
16 | 16 |
| |
| |||
243 | 243 |
| |
244 | 244 |
| |
245 | 245 |
| |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
246 | 257 |
| |
247 | 258 |
| |
248 | 259 |
| |
|
Lines changed: 13 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
37 | 37 |
| |
38 | 38 |
| |
39 | 39 |
| |
40 |
| - | |
| 40 | + | |
41 | 41 |
| |
42 | 42 |
| |
43 | 43 |
| |
44 | 44 |
| |
45 | 45 |
| |
46 | 46 |
| |
47 | 47 |
| |
| 48 | + | |
48 | 49 |
| |
49 | 50 |
| |
50 | 51 |
| |
| |||
170 | 171 |
| |
171 | 172 |
| |
172 | 173 |
| |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
173 | 185 |
| |
174 | 186 |
| |
175 | 187 |
| |
|
Lines changed: 25 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
19 | 19 |
| |
20 | 20 |
| |
21 | 21 |
| |
22 |
| - | |
| 22 | + | |
23 | 23 |
| |
24 | 24 |
| |
25 | 25 |
| |
| |||
29 | 29 |
| |
30 | 30 |
| |
31 | 31 |
| |
| 32 | + | |
32 | 33 |
| |
33 | 34 |
| |
34 | 35 |
| |
| |||
222 | 223 |
| |
223 | 224 |
| |
224 | 225 |
| |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
225 | 235 |
| |
226 | 236 |
| |
227 | 237 |
| |
| |||
456 | 466 |
| |
457 | 467 |
| |
458 | 468 |
| |
459 |
| - | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
460 | 482 |
| |
461 | 483 |
| |
| 484 | + | |
462 | 485 |
| |
463 | 486 |
| |
464 | 487 |
| |
|
Lines changed: 12 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
13 | 13 |
| |
14 | 14 |
| |
15 | 15 |
| |
16 |
| - | |
| 16 | + | |
17 | 17 |
| |
18 | 18 |
| |
19 | 19 |
| |
| |||
1613 | 1613 |
| |
1614 | 1614 |
| |
1615 | 1615 |
| |
| 1616 | + | |
| 1617 | + | |
| 1618 | + | |
| 1619 | + | |
| 1620 | + | |
| 1621 | + | |
| 1622 | + | |
| 1623 | + | |
| 1624 | + | |
| 1625 | + | |
| 1626 | + | |
1616 | 1627 |
| |
1617 | 1628 |
| |
1618 | 1629 |
| |
|
0 commit comments
Comments
(0)