Re: stored procedure stats in collector

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: stored procedure stats in collector
Дата
Msg-id 19469.1184550839@sss.pgh.pa.us
обсуждение исходный текст
Ответ на stored procedure stats in collector  (Martin Pihlak <martin.pihlak@gmail.com>)
Ответы Re: stored procedure stats in collector
Список pgsql-hackers
Martin Pihlak <martin.pihlak@gmail.com> writes:
> I'm working on a patch to extend the stats collector to handle stored procedure
> statistics (call counts, duration etc).
> ...
> Only functions with oid >= FirstNormalObjectId are accounted.

I really dislike that approach to deciding which functions to count.
The main problem with it is that it will try to count C-language
functions that are added after initdb, such as contrib stuff and
third-party add-ons like postgis.  The percentage overhead for a
typical short C function will be large, and I'm not sure anything
much is to be gained by counting these.

I think a more reasonable approach would be to count PL-language
functions; which in turn suggests that the instrumentation hooks
should be in the PL call handlers, not in ExecMakeFunctionResult
and friends where they will drag down performance of all functions.

BTW, I dunno if you've thought about the implications of inlining
of SQL functions ... it's hard to see how to count those reasonably.
        regards, tom lane


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: write_pipe_chunks patch messes up early error message output
Следующее
От: Tom Lane
Дата:
Сообщение: Re: compiler warnings on the buildfarm