Re: log database in which error occurs

From: Alexander Pyhalov <alp(at)rsu(dot)ru>
To: "A(dot) Kretschmer" <andreas(dot)kretschmer(at)schollglas(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: log database in which error occurs
Date: 2010-05-11 09:49:38
Message-ID: 4BE92832.1060806@rsu.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Jiří Pavlovský 2010-05-11 10:01:16 deadlock on simple update
Previous Message Guillaume Lelarge 2010-05-11 08:58:25 Re: can function arguments have the type tablename.columnname%TYPE?