Re: pg_stat_activity.waiting_start

From: Jim Nasby <Jim(dot)Nasby(at)BlueTreble(dot)com>
To: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Stephen Frost <sfrost(at)snowman(dot)net>, Joel Jacobson <joel(at)trustly(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pg_stat_activity.waiting_start
Date: 2016-12-28 17:19:56
Message-ID: f1e01a23-a48c-f7cf-53e2-697e6531aad3@BlueTreble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 12/28/16 7:10 AM, Amit Kapila wrote:
> Can we think of introducing new guc trace_system_waits or something
> like that which will indicate that the sessions will report the value
> of wait_start in pg_stat_activity? The default value of such a
> parameter can be false which means wait_start will be shown as NULL in
> pg_stat_activity and when it is enabled the wait_start can show the
> time as proposed in this thread.

In my experience the problem with those kind of settings is that they're
never enabled when you actually need them. I think it'd be much better
to find a way to always capture wait_starts that are over some minimum
duration, where collection overhead won't matter but you still have some
good info about what's going on. For pg_stat_activity I'd think that
threshold would be on the order of 50-100ms, though maybe there's other
places where a tighter tolerance would help.
--
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)

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Stephen Frost 2016-12-28 17:25:06 Re: Reporting planning time with EXPLAIN
Previous Message Jim Nasby 2016-12-28 17:01:53 Re: Hooks