From: | Simon Riggs <simon(at)2ndquadrant(dot)com> |
---|---|
To: | Dean Rasheed <dean_rasheed(at)hotmail(dot)com> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Auto-explain patch |
Date: | 2008-07-09 11:22:56 |
Message-ID: | 1215602576.4051.1030.camel@ebony.2ndQuadrant |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Wed, 2008-07-09 at 09:11 +0000, Dean Rasheed wrote:
> Simon, I like your proposal, and I think I can see how to code it
> fairly easily.
>
> There is one thing that it doesn't allow, however, which the debug_xxx
> parameters do, and that is for a non-superuser to trace SQL used in
> functions, from an interactive client session. For me, this is quite a
> big thing, because I find it most convienient to turn these parameters
> on while writing and tweaking stored procedures, and have the output
> go straight to my psql window, without having to connect as a superuser
> and trawl through log files.
Understood.
> So I suggest grouping these parameters in their own category
> (eg. "sql_trace") and then having additional parameters to control
> where the output would go. So the sql_trace parameters would be:
>
> * sql_trace_min_planner_duration
> * sql_trace_min_executor_duration
> * sql_trace_explain_plan
>
> and they would work exactly as you describe, except they would be
> settable by normal users.
This is already possible, if your crafty.
> Then the destination(s) for the statement
> and EXPLAIN logging would be controlled by:
>
> * client_sql_trace = on | off - settable by a normal user to allow a
> client session to see the sql_trace output. If this parameter is on,
> the sql_trace will be logged as NOTICE output.
Just set client_min_messages = 'LOG';
--
Simon Riggs www.2ndQuadrant.com
PostgreSQL Training, Services and Support
From | Date | Subject | |
---|---|---|---|
Next Message | Gregory Stark | 2008-07-09 11:42:15 | Re: Identifier case folding notes |
Previous Message | Marko Kreen | 2008-07-09 11:22:45 | Re: Auto-explain patch |