Save pg_stat_statements statistics file into $PGDATA/pg_stat directory at shutdown.
187492b6c2
changed pgstat.c so that
the stats files were saved into $PGDATA/pg_stat directory when the server
was shutdowned. But it accidentally forgot to change the location of
pg_stat_statements permanent stats file. This commit fixes pg_stat_statements
so that its stats file is also saved into $PGDATA/pg_stat at shutdown.
Since this fix changes the file layout, we don't back-patch it to 9.3
where this oversight was introduced.
This commit is contained in:
parent
55fb759ab3
commit
654e8e4447
|
@ -80,7 +80,7 @@
|
||||||
PG_MODULE_MAGIC;
|
PG_MODULE_MAGIC;
|
||||||
|
|
||||||
/* Location of permanent stats file (valid when database is shut down) */
|
/* Location of permanent stats file (valid when database is shut down) */
|
||||||
#define PGSS_DUMP_FILE "global/pg_stat_statements.stat"
|
#define PGSS_DUMP_FILE PGSTAT_STAT_PERMANENT_DIRECTORY "/pg_stat_statements.stat"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Location of external query text file. We don't keep it in the core
|
* Location of external query text file. We don't keep it in the core
|
||||||
|
|
|
@ -67,14 +67,6 @@
|
||||||
#include "utils/tqual.h"
|
#include "utils/tqual.h"
|
||||||
|
|
||||||
|
|
||||||
/* ----------
|
|
||||||
* Paths for the statistics files (relative to installation's $PGDATA).
|
|
||||||
* ----------
|
|
||||||
*/
|
|
||||||
#define PGSTAT_STAT_PERMANENT_DIRECTORY "pg_stat"
|
|
||||||
#define PGSTAT_STAT_PERMANENT_FILENAME "pg_stat/global.stat"
|
|
||||||
#define PGSTAT_STAT_PERMANENT_TMPFILE "pg_stat/global.tmp"
|
|
||||||
|
|
||||||
/* ----------
|
/* ----------
|
||||||
* Timer definitions.
|
* Timer definitions.
|
||||||
* ----------
|
* ----------
|
||||||
|
|
|
@ -20,6 +20,14 @@
|
||||||
#include "utils/relcache.h"
|
#include "utils/relcache.h"
|
||||||
|
|
||||||
|
|
||||||
|
/* ----------
|
||||||
|
* Paths for the statistics files (relative to installation's $PGDATA).
|
||||||
|
* ----------
|
||||||
|
*/
|
||||||
|
#define PGSTAT_STAT_PERMANENT_DIRECTORY "pg_stat"
|
||||||
|
#define PGSTAT_STAT_PERMANENT_FILENAME "pg_stat/global.stat"
|
||||||
|
#define PGSTAT_STAT_PERMANENT_TMPFILE "pg_stat/global.tmp"
|
||||||
|
|
||||||
/* Default directory to store temporary statistics data in */
|
/* Default directory to store temporary statistics data in */
|
||||||
#define PG_STAT_TMP_DIR "pg_stat_tmp"
|
#define PG_STAT_TMP_DIR "pg_stat_tmp"
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue