diff options
author | Magnus Hagander <magnus@hagander.net> | 2008-08-25 18:55:43 +0000 |
---|---|---|
committer | Magnus Hagander <magnus@hagander.net> | 2008-08-25 18:55:43 +0000 |
commit | f1e237b6b2e1199cdda995dd655c68b0174c8fdb (patch) | |
tree | 03f345cd87c450f2c81bd2fc4126c3a3d0953e96 /src | |
parent | d96d7be2b5652461510d7a4c1f04d5e6c2bacccd (diff) | |
download | postgresql-f1e237b6b2e1199cdda995dd655c68b0174c8fdb.tar.gz postgresql-f1e237b6b2e1199cdda995dd655c68b0174c8fdb.zip |
Unconditionally write the statsfile when SIGHUP is received, to minimize
the window during which backends have no statistics file to read.
Diffstat (limited to 'src')
-rw-r--r-- | src/backend/postmaster/pgstat.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/backend/postmaster/pgstat.c b/src/backend/postmaster/pgstat.c index c822b35d003..990b10e8ff4 100644 --- a/src/backend/postmaster/pgstat.c +++ b/src/backend/postmaster/pgstat.c @@ -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; } /* |