Re: elog() patch - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: elog() patch
Date
Msg-id Pine.LNX.4.30.0202281409340.691-100000@peter.localdomain
Whole thread Raw
In response to Re: elog() patch  (Bruce Momjian <pgman@candle.pha.pa.us>)
Responses Re: elog() patch
List pgsql-hackers
Bruce Momjian writes:

> Yes, but PANIC was chosen by vote, and it does match the kernel-level
> description.

What is the kernel-level description?

> > I doubt this idea.  NOTICE should really print to the client only.  This
> > again comes down to the user-level errors vs. server-side errors issue.
> > But INFO doesn't convey either of these meanings.
>
> We could call it TIP or something like that. I think INFO is used
> because it isn't a NOTICE or ERROR or something major.  It is only INFO.
> It is neutral information.

That's what NOTICE is.  NOTICE is only neutral information.  NOTICE could
go to the client by default, whereas if you want something in the server
log you use LOG.  I doubt an extra level is needed.

> > > New server_min_messages GUC parameter with values DEBUG[5-1], INFO, LOG, ...
> > > New client_min_messages GUC parameter with values DEBUG[5-1], LOG, INFO, ...
> >
> > Now that is *really* confusing.  Two different ways to number the same
> > things.
>
> Sure is, but it was agreed to by the group discussing it as the cleanest
> solution.  postgresql.conf has these levels documented, as does the SGML
> docs.

I doubt that agreement.

Consider, what and how much I want to debug is really quite independent of
what amount of regular "neutral" messages I want to see where.  The latter
is a rather permanent administrative decision, whereas the former is a
temporary decision to isolate problems.  A "debug level" is really a
universal concept in any package, and I hate to see it go.

Secondly, once I have decided how much debugging I want to do, it is
unlikely that I want to do a different amount of debugging on the client
and on the server.  I can see users becoming confused by this:  "I already
set the debugging level to 5, but I still only see the same messages in
the client".  I think that the current debug_level, plus a new Boolean
setting "debug_to_client" or such is sufficient and much clearer.

As far as the non-debug levels go, there isn't much choice.  ERROR and
above really needs to be communicated to the client anyway.  So you might
be able to tune which one of LOG, INFO, NOTICE goes where.  But that's
about all.

> > > Postmaster -d flag effects only postmaster message, not backend messages
> >
> > Why?
>
> This allows you to see postmaster connection-level debug stuff without
> the query debug stuff from the backend. If you want both, you have to
> set the postgres -d flag too.  Seemed clearer but I can remove it if
> people don't want it.

We had wanted to get rid of the discrepancy between postmaster and
postgres flag, not add new ones.

-- 
Peter Eisentraut   peter_e@gmx.net



pgsql-hackers by date:

Previous
From: Antonio Sergio de Mello e Souza
Date:
Subject: Re: Oracle vs PostgreSQL in real life
Next
From: Bruce Momjian
Date:
Subject: Re: elog() patch