From: Tom Lane Date: Thu, 1 Mar 2007 20:07:02 +0000 (+0000) Subject: Fix miscalculation of stats collector's write delay, introduced in revision 1.117. X-Git-Url: http://git.postgresql.org/gitweb/static/gitweb.js?a=commitdiff_plain;h=a5fb2a7ce1732bfca1da3a8e4472b8b0f74a9a38;p=users%2Fbernd%2Fpostgres.git Fix miscalculation of stats collector's write delay, introduced in revision 1.117. --- 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