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

Поиск
Список
Период
Сортировка
От Fujii Masao
Тема Re: pgsql: Include information on buffer usage during planning phase,in EX
Дата
Msg-id 4ecdae9c-fa0b-17b6-9166-0a45c396da22@oss.nttdata.com
обсуждение исходный текст
Ответ на Re: pgsql: Include information on buffer usage during planning phase, in EX  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: pgsql: Include information on buffer usage during planningphase, in EX  (Julien Rouhaud <rjuju123@gmail.com>)
Re: pgsql: Include information on buffer usage during planning phase, in EX  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-committers

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?

  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

Regards,

-- 
Fujii Masao
Advanced Computing Technology Center
Research and Development Headquarters
NTT DATA CORPORATION



В списке pgsql-committers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: pgsql: Include information on buffer usage during planning phase, in EX
Следующее
От: Julien Rouhaud
Дата:
Сообщение: Re: pgsql: Include information on buffer usage during planningphase, in EX