From: | Joel Jacobson <joel(at)trustly(dot)com> |
---|---|
To: | Pg Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: pg_stat_activity.waiting_start |
Date: | 2016-12-24 01:37:15 |
Message-ID: | CAASwCXfkxWh0W3aS7qC8Tk7-eEafxN1smhUoqe03fnJxyZ-2VQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Actually, "wait_start" is a better name to match the others
("wait_event_type" and "wait_event").
On Sat, Dec 24, 2016 at 8:20 AM, Joel Jacobson <joel(at)trustly(dot)com> wrote:
> 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
--
Joel Jacobson
Mobile: +46703603801
Trustly.com | Newsroom | LinkedIn | Twitter
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2016-12-24 02:00:59 | Re: pg_stat_activity.waiting_start |
Previous Message | Joel Jacobson | 2016-12-24 01:20:04 | pg_stat_activity.waiting_start |