diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2005-08-30 02:47:37 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2005-08-30 02:47:37 +0000 |
commit | b740be2520f2b43472f87a4672e31aab8cca9995 (patch) | |
tree | 6f190c299db1132f74b9487be74a5648393afe9f /src | |
parent | e038e89466331de17b2f857946537b30a9ec0c09 (diff) | |
download | postgresql-b740be2520f2b43472f87a4672e31aab8cca9995.tar.gz postgresql-b740be2520f2b43472f87a4672e31aab8cca9995.zip |
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.
Diffstat (limited to 'src')
-rw-r--r-- | src/backend/postmaster/pgstat.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/backend/postmaster/pgstat.c b/src/backend/postmaster/pgstat.c index 0d1128d74ea..9764f5f6528 100644 --- a/src/backend/postmaster/pgstat.c +++ b/src/backend/postmaster/pgstat.c @@ -13,7 +13,7 @@ * * Copyright (c) 2001-2005, PostgreSQL Global Development Group * - * $PostgreSQL: pgsql/src/backend/postmaster/pgstat.c,v 1.106 2005/08/15 16:25:17 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/postmaster/pgstat.c,v 1.107 2005/08/30 02:47:37 tgl Exp $ * ---------- */ #include "postgres.h" @@ -1446,8 +1446,13 @@ pgstat_send(void *msg, int len) ((PgStat_MsgHdr *) msg)->m_size = len; +#ifdef USE_ASSERT_CHECKING + if (send(pgStatSock, msg, len, 0) < 0) + elog(LOG, "could not send to statistics collector: %m"); +#else send(pgStatSock, msg, len, 0); /* We deliberately ignore any error from send() */ +#endif } |