=?utf-8?q?PG_Bug_reporting_form?= <noreply@postgresql.org> writes:
> pg_stat_statements extension always write pgss_query_texts.stat file into
> data_directory/pg_stat_tmp
> and ignore stats_temp_directory settings which supposed to overwrite stat
> directory location.
This is operating as designed, see comment in pg_stat_statements.c:
/*
* Location of external query text file. We don't keep it in the core
* system's stats_temp_directory. The core system can safely use that GUC
* setting, because the statistics collector temp file paths are set only once
* as part of changing the GUC, but pg_stat_statements has no way of avoiding
* 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_DIR "/pgss_query_texts.stat"
regards, tom lane