Re: Tracing in Postgres

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Harshitha S <hershetha(at)gmail(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Tracing in Postgres
Date: 2011-07-22 15:38:22
Message-ID: CA+TgmoaWAOn2fDrLvATsydqN9jqsf8CMw3OO0z6pY3FqUFTRbQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Jul 22, 2011 at 5:00 AM, Harshitha S <hershetha(at)gmail(dot)com> wrote:
> I am trying to integrate a tracing framework in the Postgres code.
> I need to know if elog.c under backend/utils/error is the place where the
> changes can be made.

Depends on what your tracing framework is trying to do.

> The tracing framework that I want to integrate has some additional
> capability. I want to replace the tracing and logging functionality in the
> existing Postgres framework with the APIs used in this framework without
> making changes in every file.
> If anybody has any inputs on this, please help me.

If you just want to analyze the log messages, I would suggest letting
PostgreSQL to write them out to files and then postprocessing the
files. It will be less work. Also, there's a pretty limited amount
of processing that is safe to do in elog.c. Some arbitrary part of
the system has blown up, so you can't (just to take one example) read
from the database at that point.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Joe Conway 2011-07-22 15:42:23 Re: Environment checks prior to regression tests?
Previous Message Robert Haas 2011-07-22 15:36:30 Re: Policy on pulling in code from other projects?