Re: [GENERAL] log database in which error occurs

2010-05-11 Thread Alexander Pyhalov
A. Kretschmer wrote: May 11 01:36:46 pgsql pgsql[73794]: [7-3] STATEMENT: select count(*) from forum_msg where grp_id=6709 (200 ok) ACCEPTED and is_blocked='f' Are there any ways to log database, to which invalid query was issued ? Sure: log_line_prefix = '%t ' # special v

Re: [GENERAL] log database in which error occurs

2010-05-11 Thread A. Kretschmer
In response to Alexander Pyhalov : > May 11 01:36:46 pgsql pgsql[73794]: [7-3] STATEMENT: select count(*) > from forum_msg where grp_id=6709 (200 ok) ACCEPTED and is_blocked='f' > > Are there any ways to log database, to which invalid query was issued ? Sure: log_line_prefix = '%t '

[GENERAL] log database in which error occurs

2010-05-11 Thread Alexander Pyhalov
Hello. We have postgresql 8.4 server with about 40 databases. Postgres logs error statements, but it's quite difficult to determine which users on which databases caused error. For example, this is a piece of log: May 11 01:36:46 pgsql pgsql[73794]: [7-1] ERROR: 42601: syntax error at or nea