Re: auto_explain contrib moudle

From: Jeff Davis <pgsql(at)j-davis(dot)com>
To: Martin Pihlak <martin(dot)pihlak(at)gmail(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-08 18:20:05
Message-ID: 1226168405.3002.34.camel@jdavis
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, 2008-11-08 at 12:18 +0200, Martin Pihlak wrote:
> For me the primary use of auto-explain would be interactive troubleshooting.
> The troublesome statements usually involve several nested function calls and
> are tedious to trace manually. With auto-explain I fire up psql, load the
> module, set the client log level, run the statements and immediately see
> what's going on. I bet that lot of the developers and QA folk would use it
> similarly.
>

I think the cost in terms of inconsistency here is just too high for the
benefit. If you set the client_min_messages to LOG, you should really
get *all* the log messages, not all except for those that happen to
occur when psql is in some implicit mode that's invisible to the user.

By the way, a possible solution for the problem you describe is to
simply set explain.log_min_duration=1s or something, so that you won't
see tab completion queries (or, if you do, this is the least of your
problems). Or, just disable tab completion.

> You are of course right about the log_min_duration_statement, also the
> log_executor_stats etc. behave similarly. So indeed, the "ignore notices" patch
> is not necessarily part of auto-explain.
>

I agree that there might be room for improvement in psql's handling of
notices, and that the logging system might be made more flexible. But
let's just keep it simple so that we get something in 8.4. I think
auto-explain will be very useful to a lot of people as-is.

Regards,
Jeff Davis

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2008-11-08 18:36:50 Re: Windowing Function Patch Review -> Standard Conformance
Previous Message Greg Sabino Mullane 2008-11-08 17:09:42 Re: FWD: Re: Updated backslash consistency patch