Re: client_min_messages in dumps?

Lists: pgsql-hackers
From: Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>
To: Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: client_min_messages in dumps?
Date: 2004-06-29 02:50:27
Message-ID: 40E0D8F3.6020607@familyhealth.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

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


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

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?)

regards, tom lane


From: Dennis Bjorklund <db(at)zigo(dot)dhs(dot)org>
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>, Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Subject: Re: client_min_messages in dumps?
Date: 2004-06-29 08:10:16
Message-ID: Pine.LNX.4.44.0406291007120.21809-100000@zigo.dhs.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

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


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

Dennis Bjorklund <db(at)zigo(dot)dhs(dot)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


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
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


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bruce Momjian <pgman(at)candle(dot)pha(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:55:44
Message-ID: 28980.1089122144@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)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


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 14:36:09
Message-ID: 200407061436.i66Ea9l24877@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Tom Lane wrote:
> Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)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(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


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bruce Momjian <pgman(at)candle(dot)pha(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-10 01:06:08
Message-ID: 1185.1089421568@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)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


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-10 01:19:33
Message-ID: 200407100119.i6A1JX714802@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Tom Lane wrote:
> Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)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(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


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-11 21:50:11
Message-ID: 200407112150.i6BLoBS05747@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Tom Lane wrote:
> Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)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(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