Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit b740be2

Browse files
committed
Log send() failures when sending to statistics process (but only in
assert-enabled builds). This is a temporary measure to see if we can learn anything about those intermittent stats test failures in the buildfarm.
1 parent e038e89 commit b740be2

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/backend/postmaster/pgstat.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
*
1414
* Copyright (c) 2001-2005, PostgreSQL Global Development Group
1515
*
16-
* $PostgreSQL: pgsql/src/backend/postmaster/pgstat.c,v 1.106 2005/08/15 16:25:17 tgl Exp $
16+
* $PostgreSQL: pgsql/src/backend/postmaster/pgstat.c,v 1.107 2005/08/30 02:47:37 tgl Exp $
1717
* ----------
1818
*/
1919
#include "postgres.h"
@@ -1446,8 +1446,13 @@ pgstat_send(void *msg, int len)
14461446

14471447
((PgStat_MsgHdr *) msg)->m_size = len;
14481448

1449+
#ifdef USE_ASSERT_CHECKING
1450+
if (send(pgStatSock, msg, len, 0) < 0)
1451+
elog(LOG, "could not send to statistics collector: %m");
1452+
#else
14491453
send(pgStatSock, msg, len, 0);
14501454
/* We deliberately ignore any error from send() */
1455+
#endif
14511456
}
14521457

14531458

0 commit comments

Comments
 (0)