Re: proposal: simple query profile and tracing API

Поиск
Список
Период
Сортировка
От legrand legrand
Тема Re: proposal: simple query profile and tracing API
Дата
Msg-id 1542111139733-0.post@n3.nabble.com
обсуждение исходный текст
Ответ на proposal: simple query profile and tracing API  (Pavel Stehule <pavel.stehule@gmail.com>)
Ответы Re: proposal: simple query profile and tracing API  (Pavel Stehule <pavel.stehule@gmail.com>)
Список pgsql-hackers
Hello Pavel,

What about using wait events and a trigger on pg_stat_activity ?

just :

* create a functions to get current query signature (queryid) for a pid

(not the top_level_query given for pl/pgsql blocks or triggers but the
active one)

* add some kind of active events to track planning  (in an extension with a
planning hook)

and populate some continuous views as proposed by pipelinedb (a very
flexible solution).

Yes, I know a trigger is not possible, and overhead of continuous views has
not been verified,
then some high frequency sampling on pg_stat_activity could help (I can
provide examples for f_get_current_queryid(pid), active event for planning
hook, continuous views)

An other solution: a customized version of pgsentinel (for high frequency
sampling):

see
https://www.postgresql-archive.org/Proposal-Add-accumulated-statistics-for-wait-event-td6030800.html#a6031384

Regards
PAscal



--
Sent from: http://www.postgresql-archive.org/PostgreSQL-hackers-f1928748.html


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

Предыдущее
От: "Ideriha, Takeshi"
Дата:
Сообщение: RE: Copy data to DSA area
Следующее
От: Amit Kapila
Дата:
Сообщение: Re: Race condition in WaitForBackgroundWorkerStartup