Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fyb9S-0006ZQ-9p for pgsql-bugs@arkaria.postgresql.org; Sat, 08 Sep 2018 11:11:42 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fyb9Q-0004L4-Ho for pgsql-bugs@arkaria.postgresql.org; Sat, 08 Sep 2018 11:11:40 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fyb9Q-0004Kx-Br for pgsql-bugs@lists.postgresql.org; Sat, 08 Sep 2018 11:11:40 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fyb9L-0003yQ-Ff for pgsql-bugs@lists.postgresql.org; Sat, 08 Sep 2018 11:11:39 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id w88BBUIf013345; Sat, 8 Sep 2018 07:11:30 -0400 From: Tom Lane To: maxim.boguk@gmail.com cc: pgsql-bugs@lists.postgresql.org Subject: Re: BUG #15372: pg_stat_statements extension ignore stats_temp_directory setting and always write into pg_stat_tmp In-reply-to: <153639050273.23141.4409952612133047117@wrigleys.postgresql.org> References: <153639050273.23141.4409952612133047117@wrigleys.postgresql.org> Comments: In-reply-to =?utf-8?q?PG_Bug_reporting_form?= message dated "Sat, 08 Sep 2018 07:08:22 -0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <13343.1536405090.1@sss.pgh.pa.us> Date: Sat, 08 Sep 2018 07:11:30 -0400 Message-ID: <13344.1536405090@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk =?utf-8?q?PG_Bug_reporting_form?= 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