Re: auto_explain contrib moudle

From: Martin Pihlak <martin(dot)pihlak(at)gmail(dot)com>
To: Jeff Davis <pgsql(at)j-davis(dot)com>
Cc: ITAGAKI Takahiro <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp>, Alex Hunsaker <badalex(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: auto_explain contrib moudle
Date: 2008-11-07 16:03:40
Message-ID: 491466DC.5050400@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Jeff Davis wrote:
> It still needs to be merged with HEAD.
>
ExecutorRun function signature has changed to return void. Other than that
it seems OK. I'll add a few additional notes:

One thing that I noticed was that tab completion queries are also explained
if "explain.log_min_duration" is set to zero. Actually this also applies to
psql \dX commands. Don't know if this is deliberate or not. Example:

load 'auto_explain';
set explain.log_min_duration = 0;
set client_min_messages = LOG;
select * from pg_catalog.^ILOG: duration: 4.713 ms plan:
Limit (cost=27.41..27.44 rows=3 width=85) (actual time=4.023..4.418 rows=75 loops=1)
...

I have a feeling that this can become somewhat annoying during an interactive
troubleshooting session.

Another thing is a feature I am interested in -- ability to auto-explain statements
execututed from within functions. I'm thinking of adding an extra boolean GUC --
"explain.log_nested_statements" (defaults to false). Quick test seems to give
expected results, but there maybe something I missed.

regards,
Martin

Attachment Content-Type Size
explain-nested.patch text/x-diff 2.4 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2008-11-07 16:23:37 Re: ALTER DATABASE SET TABLESPACE vs crash safety
Previous Message Alvaro Herrera 2008-11-07 15:59:49 Re: ALTER DATABASE SET TABLESPACE vs crash safety