Re: Feature request -- Log Database Name - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: Feature request -- Log Database Name
Date
Msg-id 200307232304.h6NN4ev01320@candle.pha.pa.us
Whole thread Raw
In response to Re: Feature request -- Log Database Name  (Josh Berkus <josh@agliodbs.com>)
List pgsql-hackers
Josh Berkus wrote:
> TIm,
> 
> > Anyways. If it doesn't already, having username and database would both be
> > helpful things when troubleshooting things.
> 
> Hmmm ... that would be two log TODOs.  I wonder why this has never come up 
> before ....

What we recommend is to use log_pid and log_connections and link the pid
to each log message.  The big issue is that while logging user/db/etc is
nice for grep, it can fill the logs pretty quickly.

Of course, the pid can wrap around, so it gets pretty confusing.  I have
been wondering about logging pid as 1-3321 meaning the first loop
through the pid cycle, pid 3321 so they are always unique in the log
file.

My guess is that we need something flexible to say which things should
appear on each log line, if we go that direction.

--  Bruce Momjian                        |  http://candle.pha.pa.us pgman@candle.pha.pa.us               |  (610)
359-1001+  If your life is a hard drive,     |  13 Roberts Road +  Christ can be your backup.        |  Newtown Square,
Pennsylvania19073
 


pgsql-hackers by date:

Previous
From: ivan
Date:
Subject: perm bug ?
Next
From: Bruce Momjian
Date:
Subject: Re: SELECT FOR UPDATE NOWAIT