Re: pgsql: Include information on buffer usage during planning phase, in EX

From: Fujii Masao <masao(dot)fujii(at)oss(dot)nttdata(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Michael Paquier <michael(at)paquier(dot)xyz>, Fujii Masao <fujii(at)postgresql(dot)org>, pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: Re: pgsql: Include information on buffer usage during planning phase, in EX
Date: 2020-04-03 14:28:59
Message-ID: 1c26658b-fb09-3c4c-2eff-a61e86ab5316@oss.nttdata.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

On 2020/04/03 22:35, Tom Lane wrote:
> Fujii Masao <masao(dot)fujii(at)oss(dot)nttdata(dot)com> 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

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2020-04-03 14:55:27 Re: pgsql: Include information on buffer usage during planning phase, in EX
Previous Message Tom Lane 2020-04-03 13:35:33 Re: pgsql: Include information on buffer usage during planning phase, in EX