Logging functions executed by queries in 8.2? - Mailing list pgsql-hackers

From Josh Berkus
Subject Logging functions executed by queries in 8.2?
Date
Msg-id 200702051537.53021.josh@agliodbs.com
Whole thread Raw
Responses Re: Logging functions executed by queries in 8.2?  (Josh Berkus <josh@agliodbs.com>)
Re: Logging functions executed by queries in 8.2?  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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


pgsql-hackers by date:

Previous
From: Gregory Stark
Date:
Subject: Re: Referential Integrity and SHARE locks
Next
From: Jan Wieck
Date:
Subject: Re: Proposed adjustments in MaxTupleSize and toastthresholds