diff options
author | Fujii Masao <fujii@postgresql.org> | 2014-02-03 23:19:49 +0900 |
---|---|---|
committer | Fujii Masao <fujii@postgresql.org> | 2014-02-03 23:19:49 +0900 |
commit | 3e8554a54a95425e93fe49025ccda499a1a93173 (patch) | |
tree | 34e67dfa66f2f84adbde3b69a72c326729d5d4aa /contrib/pg_stat_statements/pg_stat_statements.c | |
parent | 47aaebaac95c9000549d1a6de809e15b729231f5 (diff) | |
download | postgresql-3e8554a54a95425e93fe49025ccda499a1a93173.tar.gz postgresql-3e8554a54a95425e93fe49025ccda499a1a93173.zip |
Make pg_basebackup skip temporary statistics files.
The temporary statistics files don't need to be included in the backup
because they are always reset at the beginning of the archive recovery.
This patch changes pg_basebackup so that it skips all files located in
$PGDATA/pg_stat_tmp or the directory specified by stats_temp_directory
parameter.
Diffstat (limited to 'contrib/pg_stat_statements/pg_stat_statements.c')
-rw-r--r-- | contrib/pg_stat_statements/pg_stat_statements.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/contrib/pg_stat_statements/pg_stat_statements.c b/contrib/pg_stat_statements/pg_stat_statements.c index 3c6e84d0c40..97f171d68ed 100644 --- a/contrib/pg_stat_statements/pg_stat_statements.c +++ b/contrib/pg_stat_statements/pg_stat_statements.c @@ -68,6 +68,7 @@ #include "parser/analyze.h" #include "parser/parsetree.h" #include "parser/scanner.h" +#include "pgstat.h" #include "storage/fd.h" #include "storage/ipc.h" #include "storage/spin.h" @@ -89,7 +90,7 @@ PG_MODULE_MAGIC; * race conditions. Besides, we only expect modest, infrequent I/O for query * strings, so placing the file on a faster filesystem is not compelling. */ -#define PGSS_TEXT_FILE "pg_stat_tmp/pgss_query_texts.stat" +#define PGSS_TEXT_FILE PG_STAT_TMP_DIR "/pgss_query_texts.stat" /* Magic number identifying the stats file format */ static const uint32 PGSS_FILE_HEADER = 0x20140125; |