Re: [HACKERS] pg_stat_activity.waiting_start
От | Jim Nasby |
---|---|
Тема | Re: [HACKERS] pg_stat_activity.waiting_start |
Дата | |
Msg-id | da4f9739-1d82-d1a9-55d1-1c97ea80811a@BlueTreble.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 12/28/16 11:25 AM, Tom Lane wrote: > The idea of just capturing the wait start for heavyweight locks, and > not other lock types, still seems superior to any of the alternatives > that have been suggested ... Is some kind of alarm a viable option for the others? If setting the alarm is cheap, you could just set one for say 5ms when you have to wait on a lock. If setting one is too expensive perhaps one could be set at transaction start that looks at a global (and the global would be set when a wait started). Obviously that means there's inaccuracy to the true time spent waiting, but I think that's certainly fine for pg_stat_activity. Most importantly, it would mean that if something has gone horribly wrong you'd at least have some kind of relatively accurate duration to work from. -- Jim Nasby, Data Architect, Blue Treble Consulting, Austin TX Experts in Analytics, Data Architecture and PostgreSQL Data in Trouble? Get it in Treble! http://BlueTreble.com 855-TREBLE2 (855-873-2532)
В списке pgsql-hackers по дате отправления: