Thread: debug_print_plan

debug_print_plan

From
elein@varlena.com (elein)
Date:
I cannot get debug_print_plan to print the query plan to the
log.  I have set it in the postgresql.conf file and bounced
the server.  The output is simply not there.  show shows
that the value is set, but no output.

If someone can respond Right Now I'd very much appreciate
it. I cannot get onto irc from this client site.

--elein

Re: debug_print_plan

From
Michael Fuhr
Date:
On Wed, Mar 23, 2005 at 11:38:21AM -0800, elein wrote:
>
> I cannot get debug_print_plan to print the query plan to the
> log.  I have set it in the postgresql.conf file and bounced
> the server.  The output is simply not there.  show shows
> that the value is set, but no output.

What's your log_min_messages setting?  According to the documentation,
debug_print_* needs DEBUG1 or lower.

http://www.postgresql.org/docs/8.0/static/runtime-config.html#RUNTIME-CONFIG-LOGGING-WHAT

--
Michael Fuhr
http://www.fuhr.org/~mfuhr/

Re: debug_print_plan

From
Tom Lane
Date:
elein@varlena.com (elein) writes:
> I cannot get debug_print_plan to print the query plan to the
> log.

    /*
     * Print plan if debugging.
     */
    if (Debug_print_plan)
        elog_node_display(DEBUG1, "plan", plan, Debug_pretty_print);

Looks like you also need to have server_min_messages <= DEBUG1.

            regards, tom lane

Re: debug_print_plan

From
elein@varlena.com (elein)
Date:
Aha you are right. I tried this but set log min error statement
instead and so *that* didn't work.

Setting the right variable worked and I can now see the plan.

Thanks!!
--elein

On Wed, Mar 23, 2005 at 01:05:30PM -0700, Michael Fuhr wrote:
> On Wed, Mar 23, 2005 at 11:38:21AM -0800, elein wrote:
> >
> > I cannot get debug_print_plan to print the query plan to the
> > log.  I have set it in the postgresql.conf file and bounced
> > the server.  The output is simply not there.  show shows
> > that the value is set, but no output.
>
> What's your log_min_messages setting?  According to the documentation,
> debug_print_* needs DEBUG1 or lower.
>
> http://www.postgresql.org/docs/8.0/static/runtime-config.html#RUNTIME-CONFIG-LOGGING-WHAT
>
> --
> Michael Fuhr
> http://www.fuhr.org/~mfuhr/
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org
>