Thread: DEBUG messages

DEBUG messages

From
Sanjay Bhatia
Date:
Hi,

I've searched the docs., faqs and mailing lists for this but didn't find
anything.

Everytime I startup our postgres db, I get DEBUG messages as follows

DEBUG:  database system was shut down at 2001-11-28 16:35:55 PST
DEBUG:  CheckPoint record at (0, 2246696)
DEBUG:  Redo record at (0, 2246696); Undo record at (0, 0); Shutdown TRUE
DEBUG:  NextTransactionId: 753; NextOid: 19745
DEBUG:  database system is in production state

Can someone tell me how to display only ERROR messages?

Thanks,
sb

__________________________________________________
Do You Yahoo!?
Yahoo! GeoCities - quick and easy web site hosting, just $8.95/month.
http://geocities.yahoo.com/ps/info1

Re: DEBUG messages

From
Bruce Momjian
Date:
> I've searched the docs., faqs and mailing lists for this but didn't find
> anything.
>
> Everytime I startup our postgres db, I get DEBUG messages as follows
>
> DEBUG:  database system was shut down at 2001-11-28 16:35:55 PST
> DEBUG:  CheckPoint record at (0, 2246696)
> DEBUG:  Redo record at (0, 2246696); Undo record at (0, 0); Shutdown TRUE
> DEBUG:  NextTransactionId: 753; NextOid: 19745
> DEBUG:  database system is in production state
>
> Can someone tell me how to display only ERROR messages?

Added to TODO:

    * Change DEBUG tag used in server logs

Seems it should say NOTICE.  People are seeing DEBUG and think they have
debugging enabled.

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

Re: PostgreSQL BLOB

From
Manuel Cabido
Date:
Hello,

    How would I store jpeg file into postgresql and retrieve this jpeg
file for display in my web page? I tried the lo_export and lo_import
functions but do we have other means without resorting to these functions?

manny



Re: PostgreSQL BLOB

From
Denis Gasparin
Date:
lo_export and lo_import  work on the backend side. If you are using php as
server side language, there are similar php functions that allow you to
open/read/write large objects.

--
Ing. Denis Gasparin: denis@edistar.com
---------------------------
Programmer & System Administrator - Edistar srl
www.edistar.com



Alle 03:56, giovedì 6 dicembre 2001, hai scritto:
> Hello,
>
>     How would I store jpeg file into postgresql and retrieve this jpeg
> file for display in my web page? I tried the lo_export and lo_import
> functions but do we have other means without resorting to these functions?
>
> manny
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org


Re: DEBUG messages

From
Tom Lane
Date:
Bruce Momjian <pgman@candle.pha.pa.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.

            regards, tom lane

Re: DEBUG messages

From
Bruce Momjian
Date:
> Bruce Momjian <pgman@candle.pha.pa.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.

Oh, that is a bummer.  I see the guy's point about it being misleading
in the log, but I hate to add complexity to do it.

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

Re: DEBUG messages

From
Bruce Momjian
Date:
> Bruce Momjian <pgman@candle.pha.pa.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@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026