Re: [PATCH] Tracking statements entry timestamp in pg_stat_statements

Поиск
Список
Период
Сортировка
Искать
От
Andrei Zubkov
Тема
Re: [PATCH] Tracking statements entry timestamp in pg_stat_statements
Дата
Msg-id
10d95404920b5f2ec48496a59e8ca4939a72c67a.camel@moonset.ru
Ответ на
Список
Дерево обсуждения
[PATCH] Tracking statements entry timestamp in pg_stat_statements Andrei Zubkov <zubkov@moonset.ru>
RE: [PATCH] Tracking statements entry timestamp in pg_stat_statements "kuroda.hayato@fujitsu.com" <kuroda.hayato@fujitsu.com>
Re: [PATCH] Tracking statements entry timestamp in pg_stat_statements Andrei Zubkov <zubkov@moonset.ru>
Re: [PATCH] Tracking statements entry timestamp in pg_stat_statements Julien Rouhaud <rjuju123@gmail.com>
Re: [PATCH] Tracking statements entry timestamp in pg_stat_statements Andrei Zubkov <zubkov@moonset.ru>
RE: [PATCH] Tracking statements entry timestamp in pg_stat_statements "kuroda.hayato@fujitsu.com" <kuroda.hayato@fujitsu.com>
Re: [PATCH] Tracking statements entry timestamp in pg_stat_statements Andrei Zubkov <zubkov@moonset.ru>
Re: [PATCH] Tracking statements entry timestamp in pg_stat_statements Seino Yuki <seinoyu@oss.nttdata.com>
Re: [PATCH] Tracking statements entry timestamp in pg_stat_statements Andrei Zubkov <zubkov@moonset.ru>
RE: [PATCH] Tracking statements entry timestamp in pg_stat_statements "kuroda.hayato@fujitsu.com" <kuroda.hayato@fujitsu.com>
Re: [PATCH] Tracking statements entry timestamp in pg_stat_statements Andrei Zubkov <zubkov@moonset.ru>
Re: [PATCH] Tracking statements entry timestamp in pg_stat_statements Julien Rouhaud <rjuju123@gmail.com>
Re: [PATCH] Tracking statements entry timestamp in pg_stat_statements Andrei Zubkov <zubkov@moonset.ru>
Re: [PATCH] Tracking statements entry timestamp in pg_stat_statements Andrei Zubkov <zubkov@moonset.ru>
Re: [PATCH] Tracking statements entry timestamp in pg_stat_statements Chengxi Sun <sunchengxi@highgo.com>
Re: [PATCH] Tracking statements entry timestamp in pg_stat_statements Andrei Zubkov <zubkov@moonset.ru>
Re[2]: [PATCH] Tracking statements entry timestamp in pg_stat_statements Мельников Антон Андреевич <aamelnikov@inbox.ru>
Re: [PATCH] Tracking statements entry timestamp in pg_stat_statements Andrei Zubkov <zubkov@moonset.ru>
Re: [PATCH] Tracking statements entry timestamp in pg_stat_statements Andrei Zubkov <zubkov@moonset.ru>
Re: [PATCH] Tracking statements entry timestamp in pg_stat_statements "Anton A. Melnikov" <aamelnikov@inbox.ru>
Hi Julien,

On Tue, 2021-03-23 at 15:03 +0800, Julien Rouhaud wrote:
> Note that you could also detect entries for which some counters
> decreased (e.g.
> the execution count), and in that case only use the current values. 

Yes, but checking condition for several counters seems complicated
compared to check only one field.

>  It should
> give the exact same results as what you will get with the first_seen
> column,
> except of course if some entry is almost never used and is suddenly
> used a lot
> after an explicit reset or an eviction and only until you perform
> your
> snapshot.  I'm not sure that it's a very likely scenario though.
But it is possible, and we are guessing here. Storing a timestamp does
not seems too expensive to me, but it totally eliminates guessing, and
provides a clear view about the time interval we watching for this
specific statement.

> FTR that's how powa currently deals with reset/eviction.
PoWA sampling is much more frequent than pg_profile. For PoWA it is, of
cource, very unlikely scenario, but still possible.

-- 
Andrei Zubkov
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company




В списке pgsql-hackers по дате отправления
От: Andrey V. Lepikhov
Дата:
Сообщение: Re: Global snapshots
От: kuroda.hayato@fujitsu.com
Дата:
FAQ