Re: application for postgres Log

From: "Albe Laurenz" <laurenz(dot)albe(at)wien(dot)gv(dot)at>
To: "Arvind Singh *EXTERN*" <arvindps(at)hotmail(dot)com>, <pgsql-general(at)postgresql(dot)org>
Subject: Re: application for postgres Log
Date: 2012-09-10 07:31:29
Message-ID: D960CB61B694CF459DCFB4B0128514C20862509D@exadv11.host.magwien.gv.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Arvind Singh wrote:
> I am in a project that uses PostGresSql v9.0. We are developing an
application in CSharp to parse the
> PG server activity log installed on Windows 2003/XP or higher.
>
> Our application will :
> Scan the Log for a given search text and Post rows found
> Produce statistics related to SQL queries tracked in a time frame
> Will allow selection of log columns, that can be displayed in a
DataGrid
>
> I need some help or even a simple link that is related to this
subject. I am already checking Goog
> query of Postgres Log, though it gives mostly results for the postgres
Documentation.

Maybe pgreplay can give you some inspiration:
http://pgreplay.projects.postgresql.org/

Check out parse.c which parses a log file.

One bit of advice I'd like to give you is a recommendation
to use the CSV log format. The regular error log is much
harder to parse, and moreover everything that gets printed
to stderr by the server will end up there. This could be
dumps when the server runs out of memory or stuff that loaded
modules produce. All this will screw up your log file
parsing.

Yours,
Laurenz Albe

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Albe Laurenz 2012-09-10 08:10:55 Re: copy from .. How to get rid of encoding check for bytea coumns
Previous Message John R Pierce 2012-09-10 07:12:10 Re: application for postgres Log