Re: Rationalizing EXPLAIN VERBOSE output - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: Rationalizing EXPLAIN VERBOSE output
Date
Msg-id 200203092349.g29NnKJ21669@candle.pha.pa.us
Whole thread Raw
In response to Rationalizing EXPLAIN VERBOSE output  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Rationalizing EXPLAIN VERBOSE output  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Tom Lane wrote:
> Now that Bruce has done some work on rationalizing elog() output, seems
> like we ought to take another look at EXPLAIN VERBOSE.  Currently, that
> command does this:

Yes, the elog() tags finally match some reality.  :-)

> 1. A non-pretty-printed plan dump (nodeToString output) is sent to
> elog(INFO).  Formerly that always output to both postmaster log and
> client, but now it'll typically go only to the client.
> 
> 2. The short-form output (same as non-VERBOSE EXPLAIN) is sent to
> elog(INFO).  See above.
> 
> 3. The pretty-printed plan dump is sent to postmaster stdout.
> 
> Now postmaster stdout is just about the least good destination we
> could possibly use.  It may well end up in the bit bucket (if someone is
> only saving stderr output, and/or is using syslog logging instead of
> stderr).  In any case it's not necessarily an easy place for the client
> to get at.


Seems EXPLAIN may need a level capability like DEBUG1-5 now.  We have
EXPLAIN and EXPLAIN VERBOSE.  Now have pretty print vs. "jumble" print,
which some people do actually prefer.  They must have better cognitive
skills than me.

We now also have the index clause printing that you mentioned.  Should
we go with some kind of numeric level to EXPLAIN that would control
this?

That is the only simple solution I can think of.  GUC seems way beyond
what someone would want.  Having SET control EXPLAIN just seems overkill
because EXPLAIN should be able to control itself.

Also, clearly, we need to fix the output of pretty print to honor ELOG
control, and in any other places we may have missed it.

How about?
EXPLAIN select * from pg_class;EXPLAIN VERBOSE select * from pg_class;EXPLAIN VERBOSE 1 select * from pg_class;EXPLAIN
VERBOSE5 select * from pg_class;
 

Seems pretty clear.  VERBOSE takes an optional argument that controls
the level of detail.

--  Bruce Momjian                        |  http://candle.pha.pa.us pgman@candle.pha.pa.us               |  (610)
853-3000+  If your life is a hard drive,     |  830 Blythe Avenue +  Christ can be your backup.        |  Drexel Hill,
Pennsylvania19026
 


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Adding qualification conditions to EXPLAIN output
Next
From: Tom Lane
Date:
Subject: Re: [PATCHES] Small fix for _equalValue()