Commit 44f72c6e authored by Tom Lane's avatar Tom Lane

Fix miscalculation of stats collector's write delay, introduced in revision 1.117.

parent cba2d271
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
* *
* Copyright (c) 2001-2007, PostgreSQL Global Development Group * Copyright (c) 2001-2007, PostgreSQL Global Development Group
* *
* $PostgreSQL: pgsql/src/backend/postmaster/pgstat.c,v 1.147 2007/02/15 23:23:23 alvherre Exp $ * $PostgreSQL: pgsql/src/backend/postmaster/pgstat.c,v 1.148 2007/03/01 20:06:56 tgl Exp $
* ---------- * ----------
*/ */
#include "postgres.h" #include "postgres.h"
...@@ -1716,7 +1716,7 @@ PgstatCollectorMain(int argc, char *argv[]) ...@@ -1716,7 +1716,7 @@ PgstatCollectorMain(int argc, char *argv[])
/* Preset the delay between status file writes */ /* Preset the delay between status file writes */
MemSet(&write_timeout, 0, sizeof(struct itimerval)); MemSet(&write_timeout, 0, sizeof(struct itimerval));
write_timeout.it_value.tv_sec = PGSTAT_STAT_INTERVAL / 1000; 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 * Read in an existing statistics stats file or initialize the stats to
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment