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 1jKNJl-000275-0C for pgsql-committers@arkaria.postgresql.org; Fri, 03 Apr 2020 14:29:09 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jKNJj-00055X-T1 for pgsql-committers@arkaria.postgresql.org; Fri, 03 Apr 2020 14:29:07 +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 1jKNJj-000500-Nf for pgsql-committers@lists.postgresql.org; Fri, 03 Apr 2020 14:29:07 +0000 Received: from oss.nttdata.com ([49.212.34.109]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jKNJf-0003c6-Te for pgsql-committers@lists.postgresql.org; Fri, 03 Apr 2020 14:29:06 +0000 Received: from hnk.local (p2421237-ipbf2725funabasi.chiba.ocn.ne.jp [122.24.33.237]) by oss.nttdata.com (Postfix) with ESMTPSA id 6DFB460134; Fri, 3 Apr 2020 23:28:59 +0900 (JST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.102.2 at oss.nttdata.com Subject: Re: pgsql: Include information on buffer usage during planning phase, in EX To: Tom Lane Cc: Michael Paquier , Fujii Masao , pgsql-committers@lists.postgresql.org References: <20200403025751.GB1759@paquier.xyz> <0fa34bc8-479e-61e8-94c0-9cdbc34ea0bb@oss.nttdata.com> <23095.1585884653@sss.pgh.pa.us> <4ecdae9c-fa0b-17b6-9166-0a45c396da22@oss.nttdata.com> <20577.1585920933@sss.pgh.pa.us> From: Fujii Masao Message-ID: <1c26658b-fb09-3c4c-2eff-a61e86ab5316@oss.nttdata.com> Date: Fri, 3 Apr 2020 23:28:59 +0900 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 MIME-Version: 1.0 In-Reply-To: <20577.1585920933@sss.pgh.pa.us> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2020/04/03 22:35, Tom Lane wrote: > Fujii Masao writes: >> On 2020/04/03 12:30, Tom Lane wrote: >>> so probably the thing to do is adapt >>> the filter functions in explain.sql so that they suppress Buffers lines >>> altogether in text output. Kind of annoying, but ... > >> I'm thinking to suppress only Buffers line just after Planning Time line, >> by applying something like the following changes to explain_filter(). >> Thought? > > I think this is a bad idea. It's overcomplicated, and more to the > point: now that we've seen the problem we should realize that we're > eventually going to have failures for *any* Buffers line in text-mode > output. We're already filtering them so hard as to be nearly useless > (see a couple lines further down). I think we should just drop them > in text mode and be content with checking for them in non-text modes. Yeah, I'm fine with the idea. The regression test for EXPLAIN has the following four similar tests. The first one fails in regression test because of buffers output for the planning. Your idea seems to be equal to removal of this first test. Because there are already the same tests with other format. Is my understanding right? select explain_filter('explain (analyze, buffers, format text) select * from int8_tbl i8'); select explain_filter('explain (analyze, buffers, format json) select * from int8_tbl i8'); select explain_filter('explain (analyze, buffers, format xml) select * from int8_tbl i8'); select explain_filter('explain (analyze, buffers, format yaml) select * from int8_tbl i8'); Or another idea is to specify "summary off" in the above first EXPLAIN command, to suppress the summary output including the buffers output for the planning. This seems simple and enough. Thought? Regards, -- Fujii Masao Advanced Computing Technology Center Research and Development Headquarters NTT DATA CORPORATION