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.89) (envelope-from ) id 1h9FHS-0002pE-Jg for pgsql-hackers@arkaria.postgresql.org; Wed, 27 Mar 2019 20:36:14 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1h9FHR-0003rb-8m for pgsql-hackers@arkaria.postgresql.org; Wed, 27 Mar 2019 20:36:13 +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 1h9FHQ-0003qt-TM for pgsql-hackers@lists.postgresql.org; Wed, 27 Mar 2019 20:36:13 +0000 Received: from n3.nabble.com ([162.255.23.22]) by makus.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1h9FHN-0002Qq-VC for pgsql-hackers@postgresql.org; Wed, 27 Mar 2019 20:36:11 +0000 Received: from n3.nabble.com (localhost [127.0.0.1]) by n3.nabble.com (Postfix) with ESMTP id 3D71412DFD675 for ; Wed, 27 Mar 2019 13:36:08 -0700 (MST) Date: Wed, 27 Mar 2019 13:36:08 -0700 (MST) From: legrand legrand To: pgsql-hackers@postgresql.org Message-ID: <1553718968249-0.post@n3.nabble.com> In-Reply-To: References: <6112091549979517@myt5-a323eb993ef7.qloud-c.yandex.net> <1550179299067-0.post@n3.nabble.com> <2205341550215950@sas1-cd55e40a6ba0.qloud-c.yandex.net> 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 >> - trailing whitespaces and comments wider than 80 characters >> not fixed > why? In case it's not clear, I'm talking about the .c file, not the > regression tests. I work on a poor msys install on windows 7, where perl is broken ;o( So no pgindent available. Will fix that later, or as soon as I get a pgindent diff. >> - "Assert(planning_time > 0 && total_time > 0);" >> moved at the beginning of pgss_store > Have you tried to actually compile postgres and pg_stat_statements > with --enable-cassert? This test can *never* be true, since you > either provide the planning time or the execution time or neither. As > I said in my previous mail, adding a parameter to say which counter > you're updating, instead of adding another counter that's mutually > exclusive with the other would make everything clearer. Yes this "assert" is useless as is ... I'll remove it. I understand you proposal of pgss_store refactoring, but I don't have much time available now ... and I would like to check that performances are not broken before any other modification ... Regards PAscal -- Sent from: http://www.postgresql-archive.org/PostgreSQL-hackers-f1928748.html