*
* Copyright (c) 2001-2007, PostgreSQL Global Development Group
*
- * $PostgreSQL: pgsql/src/backend/postmaster/pgstat.c,v 1.149 2007/03/16 17:57:36 mha Exp $
+ * $PostgreSQL: pgsql/src/backend/postmaster/pgstat.c,v 1.150 2007/03/22 19:53:30 momjian Exp $
* ----------
*/
#include "postgres.h"
return 0;
}
+void allow_immediate_pgstat_restart(void)
+{
+ last_pgstat_start_time = 0;
+}
/* ------------------------------------------------------------
* Public functions used by backends follow
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/postmaster/postmaster.c,v 1.526 2007/03/07 13:35:02 alvherre Exp $
+ * $PostgreSQL: pgsql/src/backend/postmaster/postmaster.c,v 1.527 2007/03/22 19:53:30 momjian Exp $
*
* NOTES
*
signal_child(PgArchPID, SIGQUIT);
/* Tell pgstat to shut down too; nothing left for it to do */
if (PgStatPID != 0)
+ {
signal_child(PgStatPID, SIGQUIT);
+ allow_immediate_pgstat_restart();
+ }
/* Tell autovac launcher to shut down too */
if (AutoVacPID != 0)
signal_child(AutoVacPID, SIGTERM);
signal_child(PgArchPID, SIGQUIT);
/* Tell pgstat to shut down too; nothing left for it to do */
if (PgStatPID != 0)
+ {
signal_child(PgStatPID, SIGQUIT);
+ allow_immediate_pgstat_restart();
+ }
/* Tell autovac launcher to shut down too */
if (AutoVacPID != 0)
signal_child(AutoVacPID, SIGTERM);
if (PgArchPID != 0)
signal_child(PgArchPID, SIGQUIT);
if (PgStatPID != 0)
+ {
signal_child(PgStatPID, SIGQUIT);
+ allow_immediate_pgstat_restart();
+ }
if (DLGetHead(BackendList))
SignalChildren(SIGQUIT);
ExitPostmaster(0);
signal_child(PgArchPID, SIGQUIT);
/* Tell pgstat to shut down too; nothing left for it to do */
if (PgStatPID != 0)
+ {
signal_child(PgStatPID, SIGQUIT);
+ allow_immediate_pgstat_restart();
+ }
/* Tell autovac launcher to shut down too */
if (AutoVacPID != 0)
signal_child(AutoVacPID, SIGTERM);
"SIGQUIT",
(int) PgStatPID)));
signal_child(PgStatPID, SIGQUIT);
+ allow_immediate_pgstat_restart();
}
/* We do NOT restart the syslogger */
*
* Copyright (c) 2001-2007, PostgreSQL Global Development Group
*
- * $PostgreSQL: pgsql/src/include/pgstat.h,v 1.55 2007/03/16 17:57:36 mha Exp $
+ * $PostgreSQL: pgsql/src/include/pgstat.h,v 1.56 2007/03/22 19:53:31 momjian Exp $
* ----------
*/
#ifndef PGSTAT_H
extern void pgstat_init(void);
extern int pgstat_start(void);
extern void pgstat_reset_all(void);
-
+extern void allow_immediate_pgstat_restart(void);
#ifdef EXEC_BACKEND
extern void PgstatCollectorMain(int argc, char *argv[]);
#endif