Skip site navigation (1) Skip section navigation (2)

Re: Adjusting debug_print_plan to be more useful by default

From: daveg <daveg(at)sonic(dot)net>
To: Simon Riggs <simon(at)2ndQuadrant(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Adjusting debug_print_plan to be more useful by default
Date: 2008-08-19 18:28:52
Message-ID: 20080819182852.GB4818@sonic.net (view raw or flat)
Thread:
Lists: pgsql-hackers
On Tue, Aug 19, 2008 at 06:33:33PM +0100, Simon Riggs wrote:
> 
> On Tue, 2008-08-19 at 12:40 -0400, Tom Lane wrote:
> > Back in April we changed EXPLAIN VERBOSE to not dump the internal plan
> > tree anymore, on the grounds that non-hackers didn't want that info and
> > hackers could get it with debug_print_plan and related variables.
> > Well, now that I've tried to do some planner development work relying on
> > debug_print_plan instead of EXPLAIN VERBOSE, I find it a mite annoying.
> > It's not sufficient to set debug_print_plan = true, because the output
> > comes out at priority DEBUG1, which is to say it doesn't come out at all
> > in a default configuration.  If you boost up client_min_messages or
> > log_min_messages so you can see it, you get lots of extraneous debugging
> > messages too.
> > 
> > I'd like to propose that the messages emitted by debug_print_plan
> > and friends be given priority LOG rather than DEBUG1.  If you've gone
> > to the trouble of turning on the variable, then you presumably want the
> > results, so it seems dumb to print them at a priority that isn't logged
> > by default.  (Note that this is biased to the assumption that you want
> > the messages in the postmaster log, not on the console.  Which is
> > usually what I want, but maybe someone wants to argue for NOTICE?)
> > 
> > I'd also like to propose making debug_pretty_print default to ON.
> > At least for me, the other formatting is 100% unreadable.
> 
> +1

+1

-dg

-- 
David Gould       daveg(at)sonic(dot)net      510 536 1443    510 282 0869
If simplicity worked, the world would be overrun with insects.

In response to

pgsql-hackers by date

Next:From: Bruce MomjianDate: 2008-08-19 18:29:52
Subject: Re: Patch: plan invalidation vs stored procedures
Previous:From: Magnus HaganderDate: 2008-08-19 17:58:16
Subject: Re: temporary statistics option at initdb time

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group