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 1g8Yf3-0001PU-Ao for pgsql-general@arkaria.postgresql.org; Fri, 05 Oct 2018 22:33:29 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1g8Yez-0002xF-Tb for pgsql-general@arkaria.postgresql.org; Fri, 05 Oct 2018 22:33:25 +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 1g8Yez-0002x7-LA for pgsql-general@lists.postgresql.org; Fri, 05 Oct 2018 22:33:25 +0000 Received: from n3.nabble.com ([162.255.23.22]) by magus.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1g8Yes-0000bE-SB for pgsql-general@postgresql.org; Fri, 05 Oct 2018 22:33:22 +0000 Received: from n3.nabble.com (localhost [127.0.0.1]) by n3.nabble.com (Postfix) with ESMTP id 7F308F8FFB02 for ; Fri, 5 Oct 2018 15:33:16 -0700 (MST) Date: Fri, 5 Oct 2018 15:33:16 -0700 (MST) From: legrand legrand To: pgsql-general@postgresql.org Message-ID: <1538778796328-0.post@n3.nabble.com> In-Reply-To: References: <0e8b7eb4-1621-2c53-6144-af095e64b787@amazon.com> Subject: Re: survey: pg_stat_statements total_time and entry deallocation MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Hello, What about adding a log message for each entry_dealloc() execution? it could be usefull to start thinking increasing pg_stat_statements.max. is there any rule regarding the acceptable max value ? I'm playing in test with a 20 000 value without any problem, could it extendend to 100 000 ? In a system with pressure on numbers of pgss lines, and regular entry_dealloc() executions, low frequency entries are evicted firsts, and this should still be the same for new small queries with usage based on total_time. Maybe there is a third way, that would be to evict queries based on the "oldest modification time" ... This would garantee that latest queries would be kept long enough to be collected by aggregation tools. Regards PAscal -- Sent from: http://www.postgresql-archive.org/PostgreSQL-general-f1843780.html