| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | pgsql-committers(at)postgresql(dot)org |
| Subject: | pgsql: Fix WaitLatchOrSocket to handle EOF on socket correctly. |
| Date: | 2012-05-12 20:37:45 |
| Message-ID: | E1STJ4T-0007wP-UG@gemulon.postgresql.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-committers |
Fix WaitLatchOrSocket to handle EOF on socket correctly.
When using poll(), EOF on a socket is reported with the POLLHUP not
POLLIN flag (at least on Linux). WaitLatchOrSocket failed to check
this bit, causing it to go into a busy-wait loop if EOF occurs.
We earlier fixed the same mistake in the test for the state of the
postmaster_alive socket, but missed it for the caller-supplied socket.
Fortunately, this error is new in 9.2, since 9.1 only had a select()
based code path not a poll() based one.
Branch
------
master
Details
-------
http://git.postgresql.org/pg/commitdiff/31ad6553646c81f3ce8fccf8aef1a1134a7864c7
Modified Files
--------------
src/backend/port/unix_latch.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Peter Eisentraut | 2012-05-12 20:39:54 | pgsql: Remove unused AC_SUBST variables |
| Previous Message | Simon Riggs | 2012-05-12 17:30:40 | Re: Re: [COMMITTERS] pgsql: Ensure age() returns a stable value rather than the latest value |