• Tom Lane's avatar
    Improve postmaster's behavior if an accept() call fails. Because the server · cf4cc784
    Tom Lane authored
    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 give
    other 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.
    cf4cc784
postmaster.c 110 KB