Re: [HACKERS] Feature request -- Log Database Name

2003-07-30 Thread Bruce Momjian
Josh Berkus wrote: > Guys: > > > That assumes we know what the shape of the log tables will be, but this > > isn't quite clear to me - I can imagine it being different for different > > needs. Having an external program to parse the logs into INSERT > > statements would not be hard, anyway, so

Re: [HACKERS] Feature request -- Log Database Name

2003-07-30 Thread Bruce Momjian
I was thinking of outputing CREATE TABLE at the start of the log file. I see what you mean that the schemas could be different, so we would have to output the relevant fields all the time, like timestamp and username, but because the username would be joined, you would only output it on connectio

Re: [HACKERS] Feature request -- Log Database Name

2003-07-30 Thread Josh Berkus
Guys: > That assumes we know what the shape of the log tables will be, but this > isn't quite clear to me - I can imagine it being different for different > needs. Having an external program to parse the logs into INSERT > statements would not be hard, anyway, so I'm not sure that this would

Re: [HACKERS] Feature request -- Log Database Name

2003-07-30 Thread Andrew Dunstan
That assumes we know what the shape of the log tables will be, but this isn't quite clear to me - I can imagine it being different for different needs. Having an external program to parse the logs into INSERT statements would not be hard, anyway, so I'm not sure that this would buy us much. I'

Re: [HACKERS] Feature request -- Log Database Name

2003-07-30 Thread Bruce Momjian
ED]> > >>Cc: [EMAIL PROTECTED], Larry Rosenman <[EMAIL PROTECTED]>, > >> Josh Berkus <[EMAIL PROTECTED]>, > >> pgsql-hackers list <[EMAIL PROTECTED]> > >>Subject: Re: [HACKERS] Feature request -- Log Database Name > >> > &g

Re: [HACKERS] Feature request -- Log Database Name

2003-07-30 Thread Andrew Dunstan
CTED]> Cc: [EMAIL PROTECTED], Larry Rosenman <[EMAIL PROTECTED]>, Josh Berkus <[EMAIL PROTECTED]>, pgsql-hackers list <[EMAIL PROTECTED]> Subject: Re: [HACKERS] Feature request -- Log Database Name Robert Treat <[EMAIL PROTECTED]> writes: I think better would be

Re: [HACKERS] Feature request -- Log Database Name

2003-07-30 Thread ohp
pgsql-hackers list <[EMAIL PROTECTED]> > Subject: Re: [HACKERS] Feature request -- Log Database Name > > Robert Treat <[EMAIL PROTECTED]> writes: > > I think better would be a GUC "log_to_table" which wrote all standard > > out/err to a pg_log table

Re: [HACKERS] Feature request -- Log Database Name

2003-07-28 Thread Tom Lane
Robert Treat <[EMAIL PROTECTED]> writes: > I think better would be a GUC "log_to_table" which wrote all standard > out/err to a pg_log table. of course, I doubt you could make this > foolproof (how to log startup errors in this table?) but it could be a > start. How would a failed transaction mak

Re: [HACKERS] Feature request -- Log Database Name

2003-07-28 Thread Robert Treat
On Thu, 2003-07-24 at 11:23, [EMAIL PROTECTED] wrote: > Also I was thinking that we could "hide" a log table into a "special" > schema like this: > > CREATE TABLE log ( > when timestamp, > user text, > table name, > query text, > error text); > > So that iff this table exists in a databse, all

Re: [HACKERS] Feature request -- Log Database Name

2003-07-28 Thread ohp
D]> > Subject: Re: [HACKERS] Feature request -- Log Database Name > > On Thu, 2003-07-24 at 11:23, [EMAIL PROTECTED] wrote: > > Also I was thinking that we could "hide" a log table into a "special" > > schema like this: > > > > CREATE TABLE

Re: [HACKERS] Feature request -- Log Database Name

2003-07-24 Thread ohp
PROTECTED]> > Subject: Re: [HACKERS] Feature request -- Log Database Name > > > > --On Wednesday, July 23, 2003 16:20:20 -0400 Robert Treat > <[EMAIL PROTECTED]> wrote: > > > > > > Should it be a GUC like log_timestamp that can be applied to all log > >

Re: [HACKERS] Feature request -- Log Database Name

2003-07-23 Thread Bruce Momjian
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_con

Re: [HACKERS] Feature request -- Log Database Name

2003-07-23 Thread Josh Berkus
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 -- -Josh Berkus Aglio Database Solutions San Francisco

Re: [HACKERS] Feature request -- Log Database Name

2003-07-23 Thread Josh Berkus
Robert, > Should it be a GUC like log_timestamp that can be applied to all log > messages? Yes, absolutely. -- -Josh Berkus Aglio Database Solutions San Francisco ---(end of broadcast)--- TIP 5: Have you checked our extensive FAQ?

Re: [HACKERS] Feature request -- Log Database Name

2003-07-23 Thread Larry Rosenman
--On Wednesday, July 23, 2003 16:20:20 -0400 Robert Treat <[EMAIL PROTECTED]> wrote: Should it be a GUC like log_timestamp that can be applied to all log messages? IMHO, Yes, and it probably can be localized to elog(), although I haven't looked at the current elog() function code since 7.0 wh

Re: [HACKERS] Feature request -- Log Database Name

2003-07-23 Thread Robert Treat
On Wed, 2003-07-23 at 15:38, Larry Rosenman wrote: > > > --On Wednesday, July 23, 2003 12:31:38 -0700 Josh Berkus > <[EMAIL PROTECTED]> wrote: > > > Hackers, > > > > > >> Today, logs are all going to a file or syslog or both. But there is no > >> way at all you can automatically know upon witch

Re: [HACKERS] Feature request -- Log Database Name

2003-07-23 Thread Larry Rosenman
--On Wednesday, July 23, 2003 12:31:38 -0700 Josh Berkus <[EMAIL PROTECTED]> wrote: Hackers, Today, logs are all going to a file or syslog or both. But there is no way at all you can automatically know upon witch database errors are thrown Therefore, would it be possible/hard to prefix all er

Re: [HACKERS] Feature request -- Log Database Name

2003-07-23 Thread Josh Berkus
Hackers, > Today, logs are all going to a file or syslog or both. But there is no way > at all you can automatically know upon witch database errors are thrown > Therefore, would it be possible/hard to prefix all error/warning message > with the database name on witch it occured. Olivier appears