Re: Add connection active, idle time to pg_stat_activity

Поиск
Список
Период
Сортировка
От Sergey Dudoladov
Тема Re: Add connection active, idle time to pg_stat_activity
Дата
Msg-id CAA8Fd-pk89q=spKJ1vDeO2GPwEQme5Ub34v7B8XrpCE_sEOtZA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Add connection active, idle time to pg_stat_activity  (Andrey Borodin <amborodin86@gmail.com>)
Ответы Re: Add connection active, idle time to pg_stat_activity  (Andrei Zubkov <zubkov@moonset.ru>)
Список pgsql-hackers
Hello hackers,

Andrey and Nik, thank you for selecting this patch for review in
Postgres Hacking 101: I've modified the patch based both on your email
and the video.

1. Session statistics is now collected only for client backends. PG
internal processes like wal sender seem to stop sending statistics
after they have entered their respective main loops.
2. Fastpath state now counts towards the running state. I think this
special case does not justify tracking two extra numbers for every
client backend.
3. I've added a small test for pg_stat_session similar to other tests
in src/test/regress/sql/sysviews.sql
4.  Here are the pb_bench results requested in the video review:

Conditions: no assertions, number of transactions = 1000
The query: SELECT generate_series(1, 10000000) OFFSET 10000000;
With pg_stat_session:
    latency average = 324.480 ms
    tps = 3.081857 (without initial connection time)

Without pg_stat_session:
    latency average = 327.370 ms
    tps = 3.054651 (without initial connection time)


Regards,
Sergey

Вложения

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

Предыдущее
От: Konstantin Knizhnik
Дата:
Сообщение: Re: Let's make PostgreSQL multi-threaded
Следующее
От: John Naylor
Дата:
Сообщение: Re: [PoC] Improve dead tuple storage for lazy vacuum