Logging functions executed by queries in 8.2?

From: Josh Berkus <josh(at)agliodbs(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Logging functions executed by queries in 8.2?
Date: 2007-02-05 23:37:52
Message-ID: 200702051537.53021.josh@agliodbs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hackers,

In recent versions, we've changed the logging of function executions so
that only the function call is logged, and not any of the queries which it
may execute internally. While most of the time this method is superior
for performance analysis, in applications with extensive multi-line stored
procedures sometimes you want to log each individual query.

While it's kind of possible to do this via RAISE NOTICE, that doesn't
accurately get you execution times, let alone allow you do to thinks like
log query plans. This is seriously hampering our ability to
performance-optimize for TPCE.

Questions:
1) Is there any workaround for 8.2 which would allow us to log the function
queries and plans?

2) Would it be reasonable to add a log_function_bodies option for 8.3?

--
--Josh

Josh Berkus
PostgreSQL @ Sun
San Francisco

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jan Wieck 2007-02-06 00:18:26 Re: Proposed adjustments in MaxTupleSize and toastthresholds
Previous Message Gregory Stark 2007-02-05 23:25:33 Re: Referential Integrity and SHARE locks