|
Home > Archive > PostgreSQL JDBC > November 2005 > Logging from multiple connections
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Logging from multiple connections
|
|
| Kevin Grittner 2005-11-23, 8:24 pm |
| Just a couple jdbc logging suggestions.
Wading through loglevel=2 output today, it occurred to me that it would
be nice if the jdbc log file included a prefix with something to
identify the connection. Sometimes you can only get an error to occur
on a busy system with multiple active connections, and the jdbc log
currently mixes everything together, which can make it hard to follow.
A timestamp could also be useful, since I'm often trying to find
something in the jdbc log related to events from other logs which have a
timestamp.
If I've missed a way to configure these, please let me know.
-Kevin
---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster
| |
| Oliver Jowett 2005-11-23, 8:24 pm |
| Kevin Grittner wrote:
> Wading through loglevel=2 output today, it occurred to me that it would
> be nice if the jdbc log file included a prefix with something to
> identify the connection. Sometimes you can only get an error to occur
> on a busy system with multiple active connections, and the jdbc log
> currently mixes everything together, which can make it hard to follow.
Yes, this is on my todo list..
The simplest way to do it seems to be to just have a static driver-wide
counter to assign IDs to connections.
I considered backend PID, but that could in theory be duplicated, and
you can always match up PID to connection ID from the initial connection
setup logging.
-O
---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings
| |
| Oliver Jowett 2005-11-24, 3:23 am |
| Oliver Jowett wrote:
> Kevin Grittner wrote:
>
>
>
> Yes, this is on my todo list..
>
> The simplest way to do it seems to be to just have a static driver-wide
> counter to assign IDs to connections.
I just committed something like this to CVS HEAD -- loglevel is now
handled per connection (previously it was effectively driver-wide,
despite being specified as part of the connection URL), and logging
output now has both a connection ID and timestamp on each line.
-O
---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
choose an index scan if your joining column's datatypes do not
match
|
|
|
|
|