Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.92) (envelope-from ) id 1j7hDw-00081m-Il for pgsql-hackers@arkaria.postgresql.org; Fri, 28 Feb 2020 15:06:44 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1j7hDt-0002YK-Ga for pgsql-hackers@arkaria.postgresql.org; Fri, 28 Feb 2020 15:06:41 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1j7hDt-0002YC-46 for pgsql-hackers@lists.postgresql.org; Fri, 28 Feb 2020 15:06:41 +0000 Received: from n3.nabble.com ([162.255.23.22]) by makus.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1j7hDp-0004rC-D1 for pgsql-hackers@postgresql.org; Fri, 28 Feb 2020 15:06:39 +0000 Received: from n3.nabble.com (localhost [127.0.0.1]) by n3.nabble.com (Postfix) with ESMTP id DA2491B534171 for ; Fri, 28 Feb 2020 08:06:35 -0700 (MST) Date: Fri, 28 Feb 2020 08:06:35 -0700 (MST) From: legrand legrand To: pgsql-hackers@postgresql.org Message-ID: <1582902395847-0.post@n3.nabble.com> In-Reply-To: References: <1578237055901-0.post@n3.nabble.com> <1578247319224-0.post@n3.nabble.com> Subject: Re: Planning counters in pg_stat_statements (using pgss_store) 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 Hi Julien, >> But I would have prefered this new feature to work the same way with or >> without track_planning activated ;o( > Definitely, but fixing the issue in pgss (ignoring planner calls when > we don't have a query text) means that pgss won't give an exhaustive > view of activity anymore, so a fix in IVM would be a better solution. > Let's wait and see if Nagata-san and other people involved in that > have an opinion on it. It seems IVM team does not consider this point as a priority ... We should not wait for them, if we want to keep a chance to be included in PG13. So we have to make this feature more robust, an assert failure being considered as a severe regression (even if this is not coming from pgss). I like the idea of adding a check for a non-zero queryId in the new pgss_planner_hook() (zero queryid shouldn't be reserved for utility_statements ?). Fixing the corner case where a query (with no sql text) can be planned without being parsed is an other subject that should be resolved in an other thread. This kind of query was ignored in pgss, it should be ignored in pgss with planning counters. Any thoughts ? Regards PAscal -- Sent from: https://www.postgresql-archive.org/PostgreSQL-hackers-f1928748.html