Re: Exposing the stats snapshot timestamp to SQL

Поиск
Список
Период
Сортировка
От 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 по дате отправления:

Предыдущее
От: David Steele
Дата:
Сообщение: Re: Allow "snapshot too old" error, to prevent bloat
Следующее
От: David Steele
Дата:
Сообщение: Re: pgaudit - an auditing extension for PostgreSQL