Fix miscalculation of stats collector's write delay, introduced in revision 1.117.
authorTom Lane <[email protected]>
Thu, 1 Mar 2007 20:07:02 +0000 (20:07 +0000)
committerTom Lane <[email protected]>
Thu, 1 Mar 2007 20:07:02 +0000 (20:07 +0000)
src/backend/postmaster/pgstat.c

index 624fd6cf2d03cadea393551a0c4f842e1b7fc121..019ede4b2dee83777ab6fa3e33caee3864df5a53 100644 (file)
@@ -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