log database in which error occurs
От | Alexander Pyhalov |
---|---|
Тема | log database in which error occurs |
Дата | |
Msg-id | 4BE90D01.1040506@rsu.ru обсуждение исходный текст |
Ответы |
Re: log database in which error occurs
|
Список | pgsql-general |
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
В списке pgsql-general по дате отправления: