Re: [HACKERS] pg_stat_activity.waiting_start - Mailing list pgsql-hackers

From Joel Jacobson
Subject Re: [HACKERS] pg_stat_activity.waiting_start
Date
Msg-id CAASwCXf3ViE5MX1r6=AjCA0FUfw1XyDwMCCV9XmU+m9Vmz-y+Q@mail.gmail.com
Whole thread Raw
In response to [HACKERS] pg_stat_activity.waiting_start  (Joel Jacobson <joel@trustly.com>)
Responses Re: [HACKERS] pg_stat_activity.waiting_start  (Bruce Momjian <bruce@momjian.us>)
List pgsql-hackers
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.



pgsql-hackers by date:

Previous
From: Amit Kapila
Date:
Subject: Re: [HACKERS] Supporting huge pages on Windows
Next
From: Vitaly Burovoy
Date:
Subject: Re: [HACKERS] macaddr 64 bit (EUI-64) datatype support