Re: [HACKERS] pg_stat_activity.waiting_start
От | Bruce Momjian |
---|---|
Тема | Re: [HACKERS] pg_stat_activity.waiting_start |
Дата | |
Msg-id | 20170106154332.GA3693@momjian.us обсуждение исходный текст |
Ответ на | Re: [HACKERS] pg_stat_activity.waiting_start (Joel Jacobson <joel@trustly.com>) |
Ответы |
Re: [HACKERS] pg_stat_activity.waiting_start
|
Список | pgsql-hackers |
On Thu, Jan 5, 2017 at 06:48:17PM -1000, Joel Jacobson wrote: > On Thu, Jan 5, 2017 at 4:59 PM, Bruce Momjian <bruce@momjian.us> wrote: > > Agreed. No need in adding overhead for short-lived locks because the > > milli-second values are going to be meaningless to users. I would be > > happy if we could find some weasel value for non-heavyweight locks. > > To avoid a NULL value for waiting_start, and thanks to non-heavyweight > locks don't exceed order-of-milliseconds, I think it would be > acceptable to just return now() whenever something wants to know > waiting_start i.e. when something selects from pg_stat_activity. > > The exact value would only be within orders-of-milliseconds away from > now() anyway, so one can argue it's not that important, as long as the > documentation is clear on that point. I don't think now() is a good value as it doesn't indicate to the user which values are real measurements and which are not. NULL is probably the best. +/-infinity is odd too. -- Bruce Momjian <bruce@momjian.us> http://momjian.us EnterpriseDB http://enterprisedb.com + As you are, so once was I. As I am, so you will be. + + Ancient Roman grave inscription +
В списке pgsql-hackers по дате отправления: