Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit654e8e4

Browse files
committed
Save pg_stat_statements statistics file into $PGDATA/pg_stat directory at shutdown.
187492b changed pgstat.c so thatthe stats files were saved into $PGDATA/pg_stat directory when the serverwas shutdowned. But it accidentally forgot to change the location ofpg_stat_statements permanent stats file. This commit fixes pg_stat_statementsso 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.3where this oversight was introduced.
1 parent55fb759 commit654e8e4

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

‎contrib/pg_stat_statements/pg_stat_statements.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@
8080
PG_MODULE_MAGIC;
8181

8282
/* Location of permanent stats file (valid when database is shut down) */
83-
#definePGSS_DUMP_FILE"global/pg_stat_statements.stat"
83+
#definePGSS_DUMP_FILEPGSTAT_STAT_PERMANENT_DIRECTORY "/pg_stat_statements.stat"
8484

8585
/*
8686
* Location of external query text file. We don't keep it in the core

‎src/backend/postmaster/pgstat.c

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -67,14 +67,6 @@
6767
#include"utils/tqual.h"
6868

6969

70-
/* ----------
71-
* Paths for the statistics files (relative to installation's $PGDATA).
72-
* ----------
73-
*/
74-
#definePGSTAT_STAT_PERMANENT_DIRECTORY"pg_stat"
75-
#definePGSTAT_STAT_PERMANENT_FILENAME"pg_stat/global.stat"
76-
#definePGSTAT_STAT_PERMANENT_TMPFILE"pg_stat/global.tmp"
77-
7870
/* ----------
7971
* Timer definitions.
8072
* ----------

‎src/include/pgstat.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,14 @@
2020
#include"utils/relcache.h"
2121

2222

23+
/* ----------
24+
* Paths for the statistics files (relative to installation's $PGDATA).
25+
* ----------
26+
*/
27+
#definePGSTAT_STAT_PERMANENT_DIRECTORY"pg_stat"
28+
#definePGSTAT_STAT_PERMANENT_FILENAME"pg_stat/global.stat"
29+
#definePGSTAT_STAT_PERMANENT_TMPFILE"pg_stat/global.tmp"
30+
2331
/* Default directory to store temporary statistics data in */
2432
#definePG_STAT_TMP_DIR"pg_stat_tmp"
2533

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp