Ensure that we retry rather than erroring out when send() or recv() return
authorTom Lane <[email protected]>
Sun, 16 Jul 2006 18:17:23 +0000 (18:17 +0000)
committerTom Lane <[email protected]>
Sun, 16 Jul 2006 18:17:23 +0000 (18:17 +0000)
commit18c30f08ad812e4e1c1e1745d9b0911a9f5380a3
tree78f7f122aa41b730be63e2d3b2b69323873baa84
parent0954365bc77a2f6153a9f4e23545cce237c0d3a1
Ensure that we retry rather than erroring out when send() or recv() return
EINTR; the stats code was failing to do this and so were a couple of places
in the postmaster.  The stats code assumed that recv() could not return EINTR
if a preceding select() showed the socket to be read-ready, but this is
demonstrably false with our Windows implementation of recv(), and it may
not be the case on all Unix variants either.  I think this explains the
intermittent stats regression test failures we've been seeing, as well
as reports of stats collector instability under high load on Windows.

Backpatch as far as 8.0.
src/backend/postmaster/pgstat.c
src/backend/postmaster/postmaster.c