Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kJXPZ-0001nx-4U for pgsql-hackers@arkaria.postgresql.org; Sat, 19 Sep 2020 07:35:57 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kJXPW-0006cM-KR for pgsql-hackers@arkaria.postgresql.org; Sat, 19 Sep 2020 07:35:54 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kJXPW-0006cF-DU for pgsql-hackers@lists.postgresql.org; Sat, 19 Sep 2020 07:35:54 +0000 Received: from n3.nabble.com ([162.255.23.22]) by makus.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kJXPP-0006hx-0M for pgsql-hackers@postgresql.org; Sat, 19 Sep 2020 07:35:52 +0000 Received: from n3.nabble.com (localhost [127.0.0.1]) by n3.nabble.com (Postfix) with ESMTP id BDF5E21453629 for ; Sat, 19 Sep 2020 00:35:42 -0700 (MST) Date: Sat, 19 Sep 2020 00:35:42 -0700 (MST) From: legrand legrand To: pgsql-hackers@postgresql.org Message-ID: <1600500942767-0.post@n3.nabble.com> In-Reply-To: <0d9f1107772cf5c3f954e985464c7298@oss.nttdata.com> References: <0d9f1107772cf5c3f954e985464c7298@oss.nttdata.com> Subject: Re: [PATCH] Add features to pg_stat_statements 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 +1 ! An other way is to log evictions, it provides informations about time and amount : for (i = 0; i < nvictims; i++) { hash_search(pgssp_hash, &entries[i]->key, HASH_REMOVE, NULL); } pfree(entries); /* trace when evicting entries, if appening too often this can slow queries ... * increasing pg_stat_sql_plans.max value could help */ ereport(LOG, (errmsg("pg_stat_sql_plans evicting %d entries", nvictims), errhidecontext(true), errhidestmt(true))); -- Sent from: https://www.postgresql-archive.org/PostgreSQL-hackers-f1928748.html