[HACKERS] pg_stat_activity.waiting_start
От | Joel Jacobson |
---|---|
Тема | [HACKERS] pg_stat_activity.waiting_start |
Дата | |
Msg-id | CAASwCXcnCrm0HE13uw8V0ZptAWXUoKU9_NQhm8xsGZ3RhYR6fg@mail.gmail.com обсуждение исходный текст |
Ответы |
Re: [HACKERS] pg_stat_activity.waiting_start
Re: [HACKERS] pg_stat_activity.waiting_start |
Список | pgsql-hackers |
Hi hackers, We already have xact_start, query_start and backend_start to get the timestamptz for when different things happened. I would like to propose adding a fourth such column, "waiting_start", which would tell how long time a backend has been waiting. The column would be NULL when waiting=FALSE. While it's trivial to write a script that just polls pg_stat_activity every second and keeps tack of when a backend started waiting by just checking for any new waiting=TRUE rows, it would be more convenient to just get the information from pg_stat_activity directly. The use-case would be e.g. monitoring tools when you want to know how long time queries are waiting. -- Joel Jacobson
В списке pgsql-hackers по дате отправления: