From: | tgl(at)postgresql(dot)org (Tom Lane) |
---|---|
To: | pgsql-committers(at)postgresql(dot)org |
Subject: | pgsql: Improve postmaster's behavior if an accept() call fails. |
Date: | 2007-02-13 19:18:54 |
Message-ID: | 20070213191854.25E259FBA08@postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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)
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2007-02-13 19:39:42 | pgsql: Disallow committing a prepared transaction unless we are in the |
Previous Message | Bruce Momjian | 2007-02-13 18:08:39 | pgsql: Add URL for: * Update Bonjour to work with newer cross-platform |