From a5fb2a7ce1732bfca1da3a8e4472b8b0f74a9a38 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Thu, 1 Mar 2007 20:07:02 +0000 Subject: [PATCH] Fix miscalculation of stats collector's write delay, introduced in revision 1.117. --- src/backend/postmaster/pgstat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/backend/postmaster/pgstat.c b/src/backend/postmaster/pgstat.c index 624fd6cf2d..019ede4b2d 100644 --- a/src/backend/postmaster/pgstat.c +++ b/src/backend/postmaster/pgstat.c @@ -1689,7 +1689,7 @@ PgstatCollectorMain(int argc, char *argv[]) /* Preset the delay between status file writes */ MemSet(&write_timeout, 0, sizeof(struct itimerval)); write_timeout.it_value.tv_sec = PGSTAT_STAT_INTERVAL / 1000; - write_timeout.it_value.tv_usec = PGSTAT_STAT_INTERVAL % 1000; + write_timeout.it_value.tv_usec = (PGSTAT_STAT_INTERVAL % 1000) * 1000; /* * Read in an existing statistics stats file or initialize the stats to -- 2.39.5