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 near "(" at character 50
May 11 01:36:46 pgsql pgsql[73794]: [7-2] LOCATION: base_yyerror,
scan.l:907
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 ?
Are there any ways to separate general server errors and errors per each
database in several log files? I'd like general errors like SEVERE ones
to go to the /var/log/postgresql/general.log, and per-db errors on user
queries go to the /var/log/postgresql/db_$dbname.log .
--
Best regards,
Alexander Pyhalov,
system administrator of Computer Center of South Federal University
--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general