Ferdinand Smit <ferdinand@telegraafnet.nl> writes:
>> What? This seems completely redundant with the existing logging tools.
> True, but i can't see any usable function for the statics because they are
> logged without any relation. You don't know what is causing the preformence
> problem.
Sure you do: you look at the execution statistics you don't like and
then look back to see the most recent query logged by the same backend.
I do see an issue here, which is that the STATISTICS messages should be
emitted by elog() so that they will be tagged with a PID when log_pid is
true. But that's easily fixed.
BTW, you might want to look at 7.2's EXPLAIN ANALYZE command as a
different approach.
regards, tom lane