Re: DEBUG messages

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: Sanjay Bhatia <sbix(at)yahoo(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: DEBUG messages
Date: 2001-12-29 17:14:50
Message-ID: 200112291714.fBTHEpM11455@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> > Added to TODO:
> > * Change DEBUG tag used in server logs
> > Seems it should say NOTICE.
>
> It had better *not* be a NOTICE, because there is no attached client
> to forward the message to.
>
> There is some confusion in the elog() design between message severity
> level and message destination, viz DEBUG goes only to postmaster log,
> NOTICE and up go to client and log. And then we have a separate
> DebugLevel variable that controls how many places will emit DEBUG
> messages. It might be better to unify this into a single mechanism.
> Maybe replace
> if (DebugLevel > 2)
> elog(DEBUG, ...)
> with
> elog(DEBUG2, ...)
> and then have two GUC variables consulted by elog that tell the
> minimum message level to send to the log and the client respectively.

Tom, my idea on this was to emit NOTICE to clients only if a client
exists, and in postmaster startup, it does not. Frankly, assuming a
client exists for all NOTICE elogs is a bug anyway.

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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Bruce Momjian 2001-12-29 18:01:21 Re: An error in docs? (client-only installation)
Previous Message Bruce Momjian 2001-12-29 05:30:15 Re: I wrote a program to migrate Interbase -> PostgreSQL