Bruce Momjian said: > Andrew Dunstan wrote: >> >> 2 things. >> >> I submitted a patch for this 5 months ago, which is still waiting to be merged (hope it hasn't bitrotted in the meantime): >> >> . Allow log lines to include session-level information, like database and user >> >> If nobody is working on this I am prepared to look at it: >> >> . Allow logging of only data definition(DDL), or DDL and modification statements > > Yes, sorry I haven't gotten back to that, and yes the DDL idea is a good one. > > For the log idea, I think we need to get a way to merge all the > per-line info into one setup, so pid, timestamp, user, etc would all be configurable using your setup. >
I thought we had thrashed this out back in August. Certainly the only thing I recall seeing after I submitted the patch was some stylistic criticism from Neil, which I addressed in a revised patch. Anyway, it is in principle doable. That's partly why I adopted a printf style format string. There are some wrinkles, though: . interaction with syslog pid/timestamp logging . making sure the info is available when you need to log it - I had to rearrange a few thing to avoid getting SEGVs, IIRC. Also, the session duration logging part of the patch is orthogonal to the issue. cheers andrew ---------------------------(end of broadcast)--------------------------- TIP 4: Don't 'kill -9' the postmaster