Re: application for postgres Log

Поиск
Список
Период
Сортировка
От John R Pierce
Тема Re: application for postgres Log
Дата
Msg-id 504D92CA.1080001@hogranch.com
обсуждение исходный текст
Ответ на application for postgres Log  (Arvind Singh <arvindps@hotmail.com>)
Список pgsql-general
On 09/09/12 11:19 PM, 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.

the log isn't in a column oriented format although you can define a
custom log prefix of things like timestamp, database user, connection
IP, database name, process ID, and those could be treated as columns,
according to whatever seperators you specify as part of your custom log
prefix.

past that, the log is plain text.   by default only errors and a few key
system events are logged (startup, shutdown), but you can increase the
amount of logging via the various options in postgresql.conf, including
logging all statements, all connections, etc.

whatever you do, its going to be a lot of plain text parsing, I think if
it was my job, first thing I would do is generate some sample logs and
look at them to see how to proceed.



--
john r pierce                            N 37, W 122
santa cruz ca                         mid-left coast



В списке pgsql-general по дате отправления:

Предыдущее
От: Arvind Singh
Дата:
Сообщение: application for postgres Log
Следующее
От: "Albe Laurenz"
Дата:
Сообщение: Re: application for postgres Log