aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/backend/postmaster/pgstat.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/backend/postmaster/pgstat.c b/src/backend/postmaster/pgstat.c
index 4c2cc655723..a7ca8cd60d7 100644
--- a/src/backend/postmaster/pgstat.c
+++ b/src/backend/postmaster/pgstat.c
@@ -3241,10 +3241,11 @@ PgstatCollectorMain(int argc, char *argv[])
elog(LOG, "pgstat: waiting");
/* Sleep until there's something to do */
+ /* XXX should not need a timeout here */
wr = WaitLatchOrSocket(&pgStatLatch,
- WL_LATCH_SET | WL_POSTMASTER_DEATH | WL_SOCKET_READABLE,
+ WL_LATCH_SET | WL_POSTMASTER_DEATH | WL_SOCKET_READABLE | WL_TIMEOUT,
pgStatSock,
- -1L);
+ 2000L);
elog(LOG, "pgstat: wait result 0x%x", wr);