forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit44f400f
committed
Fix latch event policy that hid socket events.
If a WaitEventSetWait() caller asks for multiple events, an already setlatch would previously prevent other events from being reported at thesame time. Now, we'll also poll the kernel for other events that wouldfit in the caller's output buffer with a zero wait time. This policychange doesn't affect callers that ask for only one event.The main caller affected is the postmaster. If its latch is setextremely frequently by backends launching workers and workers exiting,we don't want it to handle only those jobs and ignore incoming clientconnections.Back-patch to 16 where the postmaster began using the API. Thefast-return policy changed here is older than that, but doesn't causeany known problems in earlier releases.Reported-by: Nathan Bossart <nathandbossart@gmail.com>Reviewed-by: Nathan Bossart <nathandbossart@gmail.com>Discussion:https://postgr.es/m/Z1n5UpAiGDmFcMmd%40nathan1 parente6767c0 commit44f400f
1 file changed
+21
-14
lines changedLines changed: 21 additions & 14 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1458 | 1458 |
| |
1459 | 1459 |
| |
1460 | 1460 |
| |
1461 |
| - | |
1462 |
| - | |
1463 |
| - | |
| 1461 | + | |
| 1462 | + | |
| 1463 | + | |
1464 | 1464 |
| |
1465 | 1465 |
| |
1466 | 1466 |
| |
| |||
1505 | 1505 |
| |
1506 | 1506 |
| |
1507 | 1507 |
| |
1508 |
| - | |
| 1508 | + | |
| 1509 | + | |
| 1510 | + | |
| 1511 | + | |
| 1512 | + | |
| 1513 | + | |
| 1514 | + | |
| 1515 | + | |
| 1516 | + | |
| 1517 | + | |
1509 | 1518 |
| |
1510 | 1519 |
| |
1511 | 1520 |
| |
| |||
1514 | 1523 |
| |
1515 | 1524 |
| |
1516 | 1525 |
| |
1517 |
| - | |
| 1526 | + | |
1518 | 1527 |
| |
1519 |
| - | |
1520 |
| - | |
1521 |
| - | |
| 1528 | + | |
| 1529 | + | |
1522 | 1530 |
| |
1523 |
| - | |
1524 | 1531 |
| |
1525 | 1532 |
| |
1526 | 1533 |
| |
1527 | 1534 |
| |
1528 |
| - | |
| 1535 | + | |
1529 | 1536 |
| |
1530 | 1537 |
| |
1531 | 1538 |
| |
| |||
1613 | 1620 |
| |
1614 | 1621 |
| |
1615 | 1622 |
| |
1616 |
| - | |
| 1623 | + | |
1617 | 1624 |
| |
1618 | 1625 |
| |
1619 | 1626 |
| |
| |||
1772 | 1779 |
| |
1773 | 1780 |
| |
1774 | 1781 |
| |
1775 |
| - | |
| 1782 | + | |
1776 | 1783 |
| |
1777 | 1784 |
| |
1778 | 1785 |
| |
| |||
1897 | 1904 |
| |
1898 | 1905 |
| |
1899 | 1906 |
| |
1900 |
| - | |
| 1907 | + | |
1901 | 1908 |
| |
1902 | 1909 |
| |
1903 | 1910 |
| |
| |||
2113 | 2120 |
| |
2114 | 2121 |
| |
2115 | 2122 |
| |
2116 |
| - | |
| 2123 | + | |
2117 | 2124 |
| |
2118 | 2125 |
| |
2119 | 2126 |
| |
|
0 commit comments
Comments
(0)