Re: log database in which error occurs - Mailing list pgsql-general

From Alexander Pyhalov
Subject Re: log database in which error occurs
Date
Msg-id 4BE92832.1060806@rsu.ru
Whole thread Raw
In response to Re: log database in which error occurs  ("A. Kretschmer" <andreas.kretschmer@schollglas.com>)
List pgsql-general
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 values:
>                                         #   %u = user name
>                                         #   %d = database name
Thank you. Somehow I've missed this line in the manual.

  > Do you know pgfouine?
> http://pgfouine.projects.postgresql.org/
Thanks for the hint. I've looked at it. Also looked at tail_n_mail
(http://bucardo.org/downloads/tail_n_mail.pl ), but  this may be too
much for us. Especially, having php on db server is not desirable. Grep
may be my best friend.

--
С уважением,
Александр Пыхалов,
системный администратор ЮГИНФО ЮФУ.


pgsql-general by date:

Previous
From: Guillaume Lelarge
Date:
Subject: Re: can function arguments have the type tablename.columnname%TYPE?
Next
From: Jiří Pavlovský
Date:
Subject: deadlock on simple update