Re: EXPLAIN BUFFERS

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Euler Taveira de Oliveira <euler(at)timbira(dot)com>
Cc: Takahiro Itagaki <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp>, Greg Smith <greg(at)2ndquadrant(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Alvaro Herrera <alvherre(at)commandprompt(dot)com>, Jeff Janes <jeff(dot)janes(at)gmail(dot)com>, Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: EXPLAIN BUFFERS
Date: 2009-12-12 02:22:11
Message-ID: 603c8f070912111822s299af4eaq59d60ab35510b8ea@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Dec 11, 2009 at 11:36 AM, Euler Taveira de Oliveira
<euler(at)timbira(dot)com> wrote:
> Robert Haas escreveu:
>> On Thu, Dec 10, 2009 at 9:35 PM, Takahiro Itagaki
>> <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp> wrote:
>>> Anyway, a revised patch according to the comments is attached.
>>> The new text format is:
>>>  Buffers: shared hit=675 read=968, temp read=1443 written=1443
>>>    * Zero values are omitted. (Non-text formats could have zero values.)
>>>    * Rename "Blocks:" to "Buffers:".
>>>    * Remove parentheses and add a comma between shared, local and temp.
>>
>> I did a bit of copy-editing of your doc changes to make the English a
>> bit more correct and idiomatic.  Slightly revised patch attached for
>> your consideration.  The output format looks really nice (thanks for
>> bearing with me), and the functionality is great.
>>
> Please, document that zero values are omitted in the text format. It seems
> intuitive but could be surprise because zero values are in non-text formats.

OK, done, see attached. I also noticed when looking through this that
the documentation says that auto_explain.log_buffers is ignored unless
auto_explain.log_analyze is set. That is true and seems right to me,
but for some reason explain_ExecutorEnd() had been changed to set
es.analyze if either log_analyze or log_buffers was set. It actually
didn't have any effect unless log_analyze was set, but only because
explain_ExecutorStart doesn't set queryDesc->doInstrument in that
case. So I've reverted that here for clarity.

...Robert

Attachment Content-Type Size
explain_buffers_20091211_rmh2.patch text/x-diff 19.1 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2009-12-12 02:27:00 Re: [PATCH] dtrace probes for memory manager
Previous Message Bruce Momjian 2009-12-12 02:05:02 Re: Need a mentor, and a project.