pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Julien Rouhaud <rjuju123@gmail.com>
To: Fujii Masao <masao.fujii@oss.nttdata.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Michael Paquier <michael@paquier.xyz>
Cc: Fujii Masao <fujii@postgresql.org>
Cc: pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Include information on buffer usage during planning phase, in EX
Date: Fri, 3 Apr 2020 09:43:47 +0200
Message-ID: <20200403074347.GA1206@nol> (raw)
In-Reply-To: <4ecdae9c-fa0b-17b6-9166-0a45c396da22@oss.nttdata.com>
References: <E1jKC4J-0007R3-Bo@gemulon.postgresql.org>
	<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>

On Fri, Apr 03, 2020 at 03:24:41PM +0900, Fujii Masao wrote:
> 
> 
> On 2020/04/03 12:30, Tom Lane wrote:
> > Fujii Masao <masao.fujii@oss.nttdata.com> writes:
> > > On 2020/04/03 11:58, Michael Paquier wrote:
> > > > prion did not like that:
> > > > https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=prion&dt=2020-04-03%2002%3A33%3A13
> > 
> > dory failed as well.  The problem is that in text mode, a Buffers line
> > won't appear at all if there were zero buffer accesses.  I don't think
> > we really want to change that,
> 
> Yes.
> 
> > 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?


+1, that's a better workaround.


> 
>  declare
>      ln text;
> +    ignore_output boolean;
>  begin
>      for ln in execute $1
>      loop
> +        IF ignore_output THEN
> +            ignore_output := false;
> +            CONTINUE WHEN (ln ~~ '  Buffers: %');
> +        END IF;
> +        ignore_output := ln ~~ 'Planning Time: %';
>          -- Replace any numeric word with just 'N'
>          ln := regexp_replace(ln, '\m\d+\M', 'N', 'g');
>          -- In sort output, the above won't match units-suffixed numbers


I'm not sure of what's plpgsql behavior here, but it's probably better to
initialize ignore_output to false.  Nitpicking, but I think that
planning_time_found, or something similar, would be better here.





view thread (18+ messages)  latest in thread

Message-ID: <20200403074347.GA1206@nol>
Permalink:  ../20200403074347.GA1206@nol/
Also on:    postgresql.org/message-id/20200403074347.GA1206@nol

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: rjuju123@gmail.com, masao.fujii@oss.nttdata.com, tgl@sss.pgh.pa.us, michael@paquier.xyz, fujii@postgresql.org
  Subject: Re: pgsql: Include information on buffer usage during planning phase, in EX
  In-Reply-To: <20200403074347.GA1206@nol>
  References: <E1jKC4J-0007R3-Bo@gemulon.postgresql.org> <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> <20200403074347.GA1206@nol>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox