[PATCH] Tracking statements entry timestamp in pg_stat_statements

Поиск
Список
Период
Сортировка
От Andrei Zubkov
Тема [PATCH] Tracking statements entry timestamp in pg_stat_statements
Дата
Msg-id 72e80e7b160a6eb189df9ef6f068cce3765d37f8.camel@moonset.ru
обсуждение исходный текст
Ответы RE: [PATCH] Tracking statements entry timestamp in pg_stat_statements
Список pgsql-hackers
This is a proposal for a new feature in pg_stat_statements extension.

As a statistical extension providing counters pg_stat_statements
extension is a target for various sampling solutions. All of them
interested in calculation of statement statistics increments between
two samples. But we face a problem here - observing one statement with
its statistics right now we can't be sure that statistics increment for
this statement is continuous from previous sample. This statement could
be deallocated after previous sample and come back soon. Also it could
happen that statement executions after that increased statistics to
above the values we observed in previous sample making it impossible to
detect deallocation on statement level.
My proposition here is to store statement entry timestamp. In this case
any sampling solution in case of returning statement will easily detect
it by changed timestamp value. And for every statement we will know
exact time interval for its statistics.

Вложения

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

Предыдущее
От: Andrei Zubkov
Дата:
Сообщение: Re: [PATCH] pg_stat_statements dealloc field ignores manual deallocation
Следующее
От: Tomas Vondra
Дата:
Сообщение: Re: WIP: BRIN multi-range indexes