Re: client_min_messages in dumps?

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>, Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: client_min_messages in dumps?
Date: 2004-07-06 13:40:22
Message-ID: 200407061340.i66DeM914838@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane wrote:
> Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)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(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2004-07-06 13:55:44 Re: client_min_messages in dumps?
Previous Message Tom Lane 2004-07-06 13:36:25 Re: More thoughts on drop tablespace