forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit48913db
committed
In immediate shutdown, postmaster should not exit till children are gone.
This adjusts commit82233ce so that thepostmaster does not exit until all its child processes have exited, evenif the 5-second timeout elapses and we have to send SIGKILL. There is nogreat value in having the postmaster process quit sooner, and doing so canmislead onlookers into thinking that the cluster is fully terminated whenactually some child processes still survive.This effect might explain recent test failures on buildfarm member hamster,wherein we failed to restart a cluster just after shutting it down with"pg_ctl stop -m immediate".I also did a bit of code review/beautification, including fixing a faultyuse of the Max() macro on a volatile expression.Back-patch to 9.4. In older branches, the postmaster never waited forchildren to exit during immediate shutdowns, and changing that would betoo much of a behavioral change.1 parentda1a9d0 commit48913db
File tree
2 files changed
+17
-19
lines changed- doc/src/sgml
- src/backend/postmaster
2 files changed
+17
-19
lines changedLines changed: 5 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1441 | 1441 |
| |
1442 | 1442 |
| |
1443 | 1443 |
| |
1444 |
| - | |
1445 |
| - | |
1446 |
| - | |
1447 |
| - | |
| 1444 | + | |
| 1445 | + | |
| 1446 | + | |
| 1447 | + | |
| 1448 | + | |
1448 | 1449 |
| |
1449 | 1450 |
| |
1450 | 1451 |
| |
|
Lines changed: 12 additions & 15 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
324 | 324 |
| |
325 | 325 |
| |
326 | 326 |
| |
327 |
| - | |
328 |
| - | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
329 | 331 |
| |
330 | 332 |
| |
331 | 333 |
| |
| |||
1419 | 1421 |
| |
1420 | 1422 |
| |
1421 | 1423 |
| |
1422 |
| - | |
| 1424 | + | |
| 1425 | + | |
1423 | 1426 |
| |
1424 | 1427 |
| |
1425 | 1428 |
| |
| |||
1433 | 1436 |
| |
1434 | 1437 |
| |
1435 | 1438 |
| |
1436 |
| - | |
| 1439 | + | |
1437 | 1440 |
| |
1438 | 1441 |
| |
1439 |
| - | |
1440 |
| - | |
| 1442 | + | |
| 1443 | + | |
| 1444 | + | |
1441 | 1445 |
| |
1442 | 1446 |
| |
1443 | 1447 |
| |
| |||
1707 | 1711 |
| |
1708 | 1712 |
| |
1709 | 1713 |
| |
1710 |
| - | |
1711 |
| - | |
| 1714 | + | |
| 1715 | + | |
1712 | 1716 |
| |
1713 | 1717 |
| |
1714 | 1718 |
| |
1715 | 1719 |
| |
1716 | 1720 |
| |
1717 |
| - | |
1718 |
| - | |
1719 |
| - | |
1720 |
| - | |
1721 |
| - | |
1722 |
| - | |
1723 |
| - | |
1724 | 1721 |
| |
1725 | 1722 |
| |
1726 | 1723 |
| |
|
0 commit comments
Comments
(0)