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 1jK67y-0006cM-11 for pgsql-hackers@arkaria.postgresql.org; Thu, 02 Apr 2020 20:07:50 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jK67w-0005bc-UM for pgsql-hackers@arkaria.postgresql.org; Thu, 02 Apr 2020 20:07:48 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jK64p-00014Z-6K for pgsql-hackers@lists.postgresql.org; Thu, 02 Apr 2020 20:04:35 +0000 Received: from n3.nabble.com ([162.255.23.22]) by magus.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jK64l-0006KF-FH for pgsql-hackers@postgresql.org; Thu, 02 Apr 2020 20:04:34 +0000 Received: from n3.nabble.com (localhost [127.0.0.1]) by n3.nabble.com (Postfix) with ESMTP id ECCA21C337C5D for ; Thu, 2 Apr 2020 13:04:28 -0700 (MST) Date: Thu, 2 Apr 2020 13:04:28 -0700 (MST) From: legrand legrand To: pgsql-hackers@postgresql.org Message-ID: <1585857868967-0.post@n3.nabble.com> In-Reply-To: <13923268-bad9-80f9-2542-5fd5e8b8c500@oss.nttdata.com> References: <1c348d6a-02e5-ef14-b9e7-22f7f36fcee1@oss.nttdata.com> <8c6449d4-5fd7-f544-182b-a4bb7da1d18c@oss.nttdata.com> <20200331060307.e7kypfynz7jous62@nol> <20200331073321.bhnx2p63gp5px37f@nol> <20200331184217.tf3x534uz4vusgmp@nol> <13923268-bad9-80f9-2542-5fd5e8b8c500@oss.nttdata.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 Fujii Masao-4 wrote > On 2020/04/01 18:19, Fujii Masao wrote: > > Finally I pushed the patch! > Many thanks for all involved in this patch! > > As a remaining TODO item, I'm thinking that the document would need to > be improved. For example, previously the query was not stored in pgss > when it failed. But, in v13, if pgss_planning is enabled, such a query is > stored because the planning succeeds. Without the explanation about > that behavior in the document, I'm afraid that users will get confused. > Thought? > > Regards, > > -- > Fujii Masao > Advanced Computing Technology Center > Research and Development Headquarters > NTT DATA CORPORATION Thank you all for this work and especially to Julian for its major contribution ! Regarding the TODO point: Yes I agree that it can be improved. My proposal: "Note that planning and execution statistics are updated only at their respective end phase, and only for successfull operations. For exemple executions counters of a long running SELECT query, will be updated at the execution end, without showing any progress report in the interval. Other exemple, if the statement is successfully planned but fails in the execution phase, only its planning statistics are stored. This may give uncorrelated plans vs calls informations." Regards PAscal -- Sent from: https://www.postgresql-archive.org/PostgreSQL-hackers-f1928748.html