Re: auto_explain contrib moudle - Mailing list pgsql-hackers

From Jeff Davis
Subject Re: auto_explain contrib moudle
Date
Msg-id 1226168405.3002.34.camel@jdavis
Whole thread Raw
In response to Re: auto_explain contrib moudle  (Martin Pihlak <martin.pihlak@gmail.com>)
List 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







pgsql-hackers by date:

Previous
From: "Douglas McNaught"
Date:
Subject: Re: Short CVS question
Next
From: Tom Lane
Date:
Subject: Re: Windowing Function Patch Review -> Standard Conformance