EXPLAIN BUFFERS - Mailing list pgsql-hackers

From Itagaki Takahiro
Subject EXPLAIN BUFFERS
Date
Msg-id 20091015201252.A2EC.52131E4D@oss.ntt.co.jp
Whole thread Raw
In response to Re: Buffer usage in EXPLAIN and pg_stat_statements (review)  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: EXPLAIN BUFFERS  (Robert Haas <robertmhaas@gmail.com>)
Re: EXPLAIN BUFFERS  (Jeff Janes <jeff.janes@gmail.com>)
List pgsql-hackers
Robert Haas <robertmhaas@gmail.com> wrote:

> In this case, I think that the auto_explain changes out to be part of
> the same patch as the core EXPLAIN changes

Here is a rewritten patch to add EXPLAIN (ANALYZE, BUFFERS) and
support for it by contrib/auto_explain. I removed pg_stat_statements
support from the patch for now.

I modifed heavily in buffer statistics conters; These counters are
put all together into struct BufferUsage. The struct is also used in
struct Instrumentation. The global buffer usage counters are saved
into 'bufusage_start' field at the InstrStartNode(), and accumulated
into 'bufusage' field and global counters are reset at InstrStopNode().

EXPLAIN BUFFERS only shows 'hit', 'read' and 'temp read' in text format
to fit in display, but xml or json format contains all of them.

I removed ShowBufferUsage() because we can retrieve the same information
from xml or json explain output, but the patch does not drop
log_statement_stats variable families nor ShowUsage() functions.
We could also remove all of them if no one use them at all.

Regards,
---
ITAGAKI Takahiro
NTT Open Source Software Center


Attachment

pgsql-hackers by date:

Previous
From: Itagaki Takahiro
Date:
Subject: Trigger with WHEN clause (WIP)
Next
From: Michael Meskes
Date:
Subject: Re: ECPG: store own copy of the prepared statement name