Index: src/backend/postmaster/pgstat.c =================================================================== RCS file: /projects/cvsroot/pgsql-server/src/backend/postmaster/pgstat.c,v retrieving revision 1.60 diff -c -r1.60 pgstat.c *** src/backend/postmaster/pgstat.c 10 Mar 2004 21:12:46 -0000 1.60 --- src/backend/postmaster/pgstat.c 14 Mar 2004 05:55:38 -0000 *************** *** 1642,1647 **** --- 1642,1648 ---- */ int nread = 0; int targetlen = sizeof(PgStat_MsgHdr); /* initial */ + bool pipeEOF = false; while (nread < targetlen) { *************** *** 1652,1664 **** { if (errno == EINTR) continue; ereport(LOG, (errcode_for_socket_access(), ! errmsg("could not read from statistics collector pipe: %m"))); exit(1); } if (len == 0) /* EOF on the pipe! */ break; nread += len; if (nread == sizeof(PgStat_MsgHdr)) { --- 1653,1675 ---- { if (errno == EINTR) continue; + #ifdef WIN32 + if (WSAGetLastError() == WSAECONNRESET) /* EOF on the pipe! (win32 socket based implementation) */ + { + pipeEOF = true; + break; + } + #endif ereport(LOG, (errcode_for_socket_access(), ! errmsg("could not read from statistics collector pipe: %m"))); exit(1); } if (len == 0) /* EOF on the pipe! */ + { + pipeEOF = true; break; + } nread += len; if (nread == sizeof(PgStat_MsgHdr)) { *************** *** 1683,1689 **** * EOF on the pipe implies that the buffer process exited. * Fall out of outer loop. */ ! if (len == 0) break; /* --- 1694,1700 ---- * EOF on the pipe implies that the buffer process exited. * Fall out of outer loop. */ ! if (pipeEOF) break; /*