Skip to content

Commit 44f72c6

Browse files
committed
Fix miscalculation of stats collector's write delay, introduced in revision 1.117.
1 parent cba2d27 commit 44f72c6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/backend/postmaster/pgstat.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
*
1414
* Copyright (c) 2001-2007, PostgreSQL Global Development Group
1515
*
16-
* $PostgreSQL: pgsql/src/backend/postmaster/pgstat.c,v 1.147 2007/02/15 23:23:23 alvherre Exp $
16+
* $PostgreSQL: pgsql/src/backend/postmaster/pgstat.c,v 1.148 2007/03/01 20:06:56 tgl Exp $
1717
* ----------
1818
*/
1919
#include "postgres.h"
@@ -1716,7 +1716,7 @@ PgstatCollectorMain(int argc, char *argv[])
17161716
/* Preset the delay between status file writes */
17171717
MemSet(&write_timeout, 0, sizeof(struct itimerval));
17181718
write_timeout.it_value.tv_sec = PGSTAT_STAT_INTERVAL / 1000;
1719-
write_timeout.it_value.tv_usec = PGSTAT_STAT_INTERVAL % 1000;
1719+
write_timeout.it_value.tv_usec = (PGSTAT_STAT_INTERVAL % 1000) * 1000;
17201720

17211721
/*
17221722
* Read in an existing statistics stats file or initialize the stats to

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy