diff --git a/contrib/pg_stat_statements/pg_stat_statements.c b/contrib/pg_stat_statements/pg_stat_statements.c index 32d16cc5f3..a3e8c595b8 100644 --- a/contrib/pg_stat_statements/pg_stat_statements.c +++ b/contrib/pg_stat_statements/pg_stat_statements.c @@ -80,7 +80,7 @@ PG_MODULE_MAGIC; /* 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 diff --git a/src/backend/postmaster/pgstat.c b/src/backend/postmaster/pgstat.c index f86481665f..3ab1428f7c 100644 --- a/src/backend/postmaster/pgstat.c +++ b/src/backend/postmaster/pgstat.c @@ -67,14 +67,6 @@ #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. * ---------- diff --git a/src/include/pgstat.h b/src/include/pgstat.h index d9de09fea0..08925336d1 100644 --- a/src/include/pgstat.h +++ b/src/include/pgstat.h @@ -20,6 +20,14 @@ #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 */ #define PG_STAT_TMP_DIR "pg_stat_tmp"