pgsql: Improve postmaster's behavior if an accept() call fails. - Mailing list pgsql-committers

From tgl@postgresql.org (Tom Lane)
Subject pgsql: Improve postmaster's behavior if an accept() call fails.
Date
Msg-id 20070213191854.25E259FBA08@postgresql.org
Whole thread Raw
List pgsql-committers
Log Message:
-----------
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 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.

Modified Files:
--------------
    pgsql/src/backend/libpq:
        pqcomm.c (r1.189 -> r1.190)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/libpq/pqcomm.c.diff?r1=1.189&r2=1.190)
    pgsql/src/backend/postmaster:
        postmaster.c (r1.520 -> r1.521)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/postmaster/postmaster.c.diff?r1=1.520&r2=1.521)

pgsql-committers by date:

Previous
From: momjian@postgresql.org (Bruce Momjian)
Date:
Subject: pgsql: Add URL for: * Update Bonjour to work with newer cross-platform
Next
From: tgl@postgresql.org (Tom Lane)
Date:
Subject: pgsql: Disallow committing a prepared transaction unless we are in the