1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-28 23:42:10 +03:00

Unconditionally write the statsfile when SIGHUP is received, to minimize

the window during which backends have no statistics file to read.
This commit is contained in:
Magnus Hagander
2008-08-25 18:55:43 +00:00
parent d96d7be2b5
commit f1e237b6b2
2 changed files with 7 additions and 4 deletions

View File

@ -13,7 +13,7 @@
*
* Copyright (c) 2001-2008, PostgreSQL Global Development Group
*
* $PostgreSQL: pgsql/src/backend/postmaster/pgstat.c,v 1.180 2008/08/25 15:11:00 mha Exp $
* $PostgreSQL: pgsql/src/backend/postmaster/pgstat.c,v 1.181 2008/08/25 18:55:43 mha Exp $
* ----------
*/
#include "postgres.h"
@ -2638,11 +2638,14 @@ PgstatCollectorMain(int argc, char *argv[])
/*
* Reload configuration if we got SIGHUP from the postmaster.
* Also, signal a new write of the file, so we drop a new file as
* soon as possible of the directory for it changes.
*/
if (got_SIGHUP)
{
ProcessConfigFile(PGC_SIGHUP);
got_SIGHUP = false;
need_statwrite = true;
}
/*