Re: Auto-explain patch - Mailing list pgsql-hackers

From ITAGAKI Takahiro
Subject Re: Auto-explain patch
Date
Msg-id 20080826174150.7802.52131E4D@oss.ntt.co.jp
Whole thread Raw
In response to Re: Auto-explain patch  (Dean Rasheed <dean_rasheed@hotmail.com>)
Responses Re: Auto-explain patch  (Simon Riggs <simon@2ndQuadrant.com>)
Re: Auto-explain patch  (ITAGAKI Takahiro <itagaki.takahiro@oss.ntt.co.jp>)
List pgsql-hackers
Hi,

I'm very interested in the auto-explain feature.
Are there any plans to re-add it in the next commit-fest?

Dean Rasheed <dean_rasheed@hotmail.com> wrote:

> > Please do not export ExplainState --- that's an internal matter for
> > explain.c. Export some wrapper function with a cleaner API than
> > explain_outNode, instead.
>
> OK, that's much neater.

How about the attached patch?
I exported initialization of ExplainState and explain_outNode call
to a new function ExplainOneResult. It receives executor nodes and
returns the tree as a text.

I think it'd be better to implement the auto-explain feature
not as a core feature but as an extension, because various users
have various desires about the feature. We could write a small extension
moudle using hooks and the ExplainOneResult function. If we includes
the extension as a contrib module, users can mofify it and install
customized version of auto-explain.

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


Attachment

pgsql-hackers by date:

Previous
From: Greg Smith
Date:
Subject: Re: Split up the wiki TODO page?
Next
From: Simon Riggs
Date:
Subject: Re: Auto-explain patch