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 1jKMU2-0008Il-0M for pgsql-committers@arkaria.postgresql.org; Fri, 03 Apr 2020 13:35:42 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jKMU0-0004Ca-Te for pgsql-committers@arkaria.postgresql.org; Fri, 03 Apr 2020 13:35:40 +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 1jKMU0-0004CT-O5 for pgsql-committers@lists.postgresql.org; Fri, 03 Apr 2020 13:35:40 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jKMTx-0007N7-Bk for pgsql-committers@lists.postgresql.org; Fri, 03 Apr 2020 13:35:40 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id 033DZXol020578; Fri, 3 Apr 2020 09:35:33 -0400 From: Tom Lane To: Fujii Masao cc: Michael Paquier , Fujii Masao , pgsql-committers@lists.postgresql.org Subject: Re: pgsql: Include information on buffer usage during planning phase, in EX In-reply-to: <4ecdae9c-fa0b-17b6-9166-0a45c396da22@oss.nttdata.com> 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> Comments: In-reply-to Fujii Masao message dated "Fri, 03 Apr 2020 15:24:41 +0900" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <20576.1585920933.1@sss.pgh.pa.us> Date: Fri, 03 Apr 2020 09:35:33 -0400 Message-ID: <20577.1585920933@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk 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. Robert's muttered about possibly introducing some EXPLAIN option that would make the output a bit less variable. Perhaps we should do that. I'm not quite sure I like the idea on theoretical grounds: testing a different behavior from what you do in production seems like the wrong thing. But it'd allow undoing decisions like this one. It's too late to consider such a thing for v13, though --- four days before feature freeze is no time to be designing new features. So for now, we have to make the output stable with the tools we have, and text-mode Buffers output is unstable by design. regards, tom lane