forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitcf4cc78
committed
Improve postmaster's behavior if an accept() call fails. Because the server
socket is still read-ready, the code was a tight loop, wasting lots of CPU.We can't do anything to clear the failure, other than wait, but we should giveother processes more chance to finish and release FDs; so insert a small sleep.Also, avoid bogus "close(-1)" in this case. Per report from Jim Nasby.1 parentb9c65ae commitcf4cc78
2 files changed
+13
-4
lines changedLines changed: 10 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
30 | 30 |
| |
31 | 31 |
| |
32 | 32 |
| |
33 |
| - | |
| 33 | + | |
34 | 34 |
| |
35 | 35 |
| |
36 | 36 |
| |
| |||
528 | 528 |
| |
529 | 529 |
| |
530 | 530 |
| |
531 |
| - | |
| 531 | + | |
532 | 532 |
| |
533 | 533 |
| |
534 | 534 |
| |
| |||
548 | 548 |
| |
549 | 549 |
| |
550 | 550 |
| |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
551 | 559 |
| |
552 | 560 |
| |
553 | 561 |
| |
|
Lines changed: 3 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
37 | 37 |
| |
38 | 38 |
| |
39 | 39 |
| |
40 |
| - | |
| 40 | + | |
41 | 41 |
| |
42 | 42 |
| |
43 | 43 |
| |
| |||
1710 | 1710 |
| |
1711 | 1711 |
| |
1712 | 1712 |
| |
1713 |
| - | |
| 1713 | + | |
| 1714 | + | |
1714 | 1715 |
| |
1715 | 1716 |
| |
1716 | 1717 |
| |
|
0 commit comments
Comments
(0)