| От | Tom Lane |
|---|---|
| Тема | Re: Exposing the stats snapshot timestamp to SQL |
| Дата | |
| Msg-id | 32461.1424401272@sss.pgh.pa.us обсуждение |
| Ответ на | Re: Exposing the stats snapshot timestamp to SQL (Matt Kelly <mkellycs@gmail.com>) |
| Список | pgsql-hackers |
Matt Kelly <mkellycs@gmail.com> writes:
>> Yeah. The only use-case that's been suggested is detecting an
>> unresponsive stats collector, and the main timestamp should be plenty for
>> that.
> The problem with doing highly granular snapshots is that the postgres
> counters are monotonically increasing, but only when stats are published.
> Currently you have no option except to divide by the delta of now() between
> the polling intervals. If you poll every 2 seconds the max error is about
> .5/2 or 25%. It makes reading those numbers a bit noisy. Using
> (snapshot_timestamp_new
> - snapshot_timestamp_old) as the denominator in that calculation should
> help to smooth out that noise and show a clearer picture.
Ah, interesting! Thanks for pointing out another use case.
regards, tom lane
В списке pgsql-hackers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера