Re: [HACKERS] pg_stat_activity.waiting_start

Поиск
Список
Период
Сортировка
От Greg Stark
Тема Re: [HACKERS] pg_stat_activity.waiting_start
Дата
Msg-id CAM-w4HOR4Jo6ecj12t3ae9Kj7kFg9EFAcvc3X1jNY6c0QeF+iw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [HACKERS] pg_stat_activity.waiting_start  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: [HACKERS] pg_stat_activity.waiting_start
Список pgsql-hackers


On Dec 24, 2016 5:44 PM, "Tom Lane" <tgl@sss.pgh.pa.us> wrote:
I think we'd need at least an order of
magnitude cheaper to consider putting timing calls into spinlock or lwlock
paths, and that's just not available at all, let alone portably.

For spinlocks we could conceivably just bite the bullet and use a raw rdtsc or the equivalent for other platforms. It might be pretty easy to distinguish sane numbers from numbers that result after a process reschedule and we could just discard data when that happens (or count occurrences).

That may possibly work for spinlocks but it won't work for anything heavier where process reschedules are routine.

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