Would anyone else think that dumping:

SET client_min_messages TO warning;

In pg_dumps would be cool?

It would mean that while restoring a dump you can actually see the wood 
for the trees when trying to see ERRORs and WARNINGs the the massive 
spam of messages you get while restoring.

Chris


Tue, 29 Jun 2004 10:50:27 +0800
Christopher Kings-Lynne <chriskl@familyhealth.com.au>
client_min_messages in dumps?
Christopher Kings-Lynne <chriskl@familyhealth.com.au> writes:
> Would anyone else think that dumping:
>   SET client_min_messages TO warning;
> In pg_dumps would be cool?

> It would mean that while restoring a dump you can actually see the wood 
> for the trees when trying to see ERRORs and WARNINGs the the massive 
> spam of messages you get while restoring.

Another answer is to get rid of some of our chattier NOTICEs, or at
least downgrade 'em to DEBUG1 or thereabouts.  Does anyone really still
think that
NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index "foo_pkey" for table "foo"
is conveying any useful information?  It's not like you couldn't find
out the name of the index from "\d foo".

I think this is a better answer than having pg_dump try to force the
message level, since that would get in the way of seeing the messages
when you needed to do so for debugging reasons.

(cc'ing to Bruce who has always been the most vocal defender of those
notices... now where did I put my flameproof longjohns?)

			regards, tom lane

Tue, 29 Jun 2004 02:27:24 -0400
Tom Lane <tgl@sss.pgh.pa.us>
Re: client_min_messages in dumps? 
On Tue, 29 Jun 2004, Tom Lane wrote:

> NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index "foo_pkey" for table "foo"
> is conveying any useful information?

Maybe there should be another level called NOVICE :-)

-- 
/Dennis Bjï¿½rklund


Tue, 29 Jun 2004 10:10:16 +0200 (CEST)
Dennis Bjorklund <db@zigo.dhs.org>
Re: client_min_messages in dumps? 
Dennis Bjorklund <db@zigo.dhs.org> writes:
> On Tue, 29 Jun 2004, Tom Lane wrote:
>> NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index "foo_pkey" for table "foo"
>> is conveying any useful information?

> Maybe there should be another level called NOVICE :-)

Not a bad idea --- could satisfy everybody?

			regards, tom lane

Tue, 29 Jun 2004 09:43:55 -0400
Tom Lane <tgl@sss.pgh.pa.us>
Re: client_min_messages in dumps? 
Tom Lane wrote:
> Christopher Kings-Lynne <chriskl@familyhealth.com.au> writes:
> > Would anyone else think that dumping:
> >   SET client_min_messages TO warning;
> > In pg_dumps would be cool?
> 
> > It would mean that while restoring a dump you can actually see the wood 
> > for the trees when trying to see ERRORs and WARNINGs the the massive 
> > spam of messages you get while restoring.
> 
> Another answer is to get rid of some of our chattier NOTICEs, or at
> least downgrade 'em to DEBUG1 or thereabouts.  Does anyone really still
> think that
> NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index "foo_pkey" for table "foo"
> is conveying any useful information?  It's not like you couldn't find
> out the name of the index from "\d foo".
> 
> I think this is a better answer than having pg_dump try to force the
> message level, since that would get in the way of seeing the messages
> when you needed to do so for debugging reasons.
> 
> (cc'ing to Bruce who has always been the most vocal defender of those
> notices... now where did I put my flameproof longjohns?)

I agree changing some of those noiser notices would be good.  I think
the best idea would be to add a client_min_messages level of novice for
them.  In fact, looking at the code, I see that the INFO level is almost
never used in our code.  Perhaps we should just downgrade them to
INFO-level messages.

FYI, I have never advocated those messages.  Rather, I advocated
allowing users to control how much detail they see in their client and
in their logs.

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

Tue, 6 Jul 2004 09:40:22 -0400 (EDT)
Bruce Momjian <pgman@candle.pha.pa.us>
Re: client_min_messages in dumps?
Bruce Momjian <pgman@candle.pha.pa.us> writes:
> I agree changing some of those noiser notices would be good.  I think
> the best idea would be to add a client_min_messages level of novice for
> them.

Yes ...

> In fact, looking at the code, I see that the INFO level is almost
> never used in our code.  Perhaps we should just downgrade them to
> INFO-level messages.

No!  That is not a downgrade --- INFO messages are *not suppressable*.

			regards, tom lane

Tue, 06 Jul 2004 09:55:44 -0400
Tom Lane <tgl@sss.pgh.pa.us>
Re: client_min_messages in dumps? 
Tom Lane wrote:
> Bruce Momjian <pgman@candle.pha.pa.us> writes:
> > I agree changing some of those noiser notices would be good.  I think
> > the best idea would be to add a client_min_messages level of novice for
> > them.
> 
> Yes ...
> 
> > In fact, looking at the code, I see that the INFO level is almost
> > never used in our code.  Perhaps we should just downgrade them to
> > INFO-level messages.
> 
> No!  That is not a downgrade --- INFO messages are *not suppressable*.

Uh, postgresql.conf has:
	
	#client_min_messages = notice   # Values, in order of decreasing detail:
	                                #   debug5, debug4, debug3, debug2, debug1,
	                                #   log, info, notice, warning, error
	
	#log_min_messages = notice      # Values, in order of decreasing detail:
	                                #   debug5, debug4, debug3, debug2, debug1,
	                                #   info, notice, warning, error, log, fatal,
	                                #   panic

I also don't see LOG used much in the code at all.  It seems to be used
mostly by VACUUM and ANALYZE.  Seems something is wrong.


-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

Tue, 6 Jul 2004 10:36:09 -0400 (EDT)
Bruce Momjian <pgman@candle.pha.pa.us>
Re: client_min_messages in dumps?
Bruce Momjian <pgman@candle.pha.pa.us> writes:
> I also don't see LOG used much in the code at all.  It seems to be used
> mostly by VACUUM and ANALYZE.  Seems something is wrong.

There is nothing wrong except that you've forgotten how we designed
VACUUM VERBOSE to work with the new logging-levels stuff... that is
basically what INFO is for.

			regards, tom lane

Fri, 09 Jul 2004 21:06:08 -0400
Tom Lane <tgl@sss.pgh.pa.us>
Re: client_min_messages in dumps? 
Tom Lane wrote:
> Bruce Momjian <pgman@candle.pha.pa.us> writes:
> > I also don't see LOG used much in the code at all.  It seems to be used
> > mostly by VACUUM and ANALYZE.  Seems something is wrong.
> 
> There is nothing wrong except that you've forgotten how we designed
> VACUUM VERBOSE to work with the new logging-levels stuff... that is
> basically what INFO is for.

Well, then the postgresql.conf description is wrong, and
client_min_messages shouldn't be able to be set to 'info'.

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

Fri, 9 Jul 2004 21:19:33 -0400 (EDT)
Bruce Momjian <pgman@candle.pha.pa.us>
Re: client_min_messages in dumps?
Tom Lane wrote:
> Bruce Momjian <pgman@candle.pha.pa.us> writes:
> > I also don't see LOG used much in the code at all.  It seems to be used
> > mostly by VACUUM and ANALYZE.  Seems something is wrong.
> 
> There is nothing wrong except that you've forgotten how we designed
> VACUUM VERBOSE to work with the new logging-levels stuff... that is
> basically what INFO is for.
> 

OK, it turns out only postgresql.conf was wrong about mentioning INFO as
a proper client_min_messages level.  The SGML docs didn't mention it as
a value.

Added to TODO:

	* Add NOVICE output level for helpful messages like automatic
	  sequence/index creation

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

Sun, 11 Jul 2004 17:50:11 -0400 (EDT)
Bruce Momjian <pgman@candle.pha.pa.us>
Re: client_min_messages in dumps?