Re: RFC: replace pg_stat_activity.waiting with something more descriptive

From: Merlin Moncure <mmoncure(at)gmail(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: RFC: replace pg_stat_activity.waiting with something more descriptive
Date: 2015-06-22 20:40:33
Message-ID: CAHyXU0xA3hAY0eeDq9O4D+uCG7=8uFDzB04NCz=84YTkeeXRvQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Jun 22, 2015 at 12:37 PM, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
> When a PostgreSQL system wedges, or when it becomes dreadfully slow
> for some reason, I often find myself relying on tools like strace,
> gdb, or perf to figure out what is happening. This doesn't tend to
> instill customers with confidence; they would like (quite
> understandably) a process that doesn't require installing developer
> tools on their production systems, and doesn't require a developer to
> interpret the results, and perhaps even something that they could
> connect up to PEM or Nagios or whatever alerting system they are
> using.
>
> There are obviously many ways that we might think about improving
> things here, but what I'd like to do is try to put some better
> information in pg_stat_activity, so that when a process is not
> running, users can get some better information about *why* it's not
> running. The basic idea is that pg_stat_activity.waiting would be
> replaced by a new column pg_stat_activity.wait_event, which would
> display the reason why that backend is waiting. This wouldn't be a
> free-form text field, because that would be too expensive to populate.
> Instead it would contain a "reason code" which would be chosen from a
> list of reason codes and translated to text for display.

Instead of changing the column, can't we add a new one? Adjusting
columns in PSA requires the innumerable queries written against it to
be adjusted along with all the wiki instructions to dev ops for
emergency stuck query detection etc etc. I would also prefer to
query 'waiting' in some cases, especially when in emergency
situations; it's faster to type.

merlin

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2015-06-22 21:03:40 Re: RFC: replace pg_stat_activity.waiting with something more descriptive
Previous Message David G. Johnston 2015-06-22 20:28:39 Re: RFC: replace pg_stat_activity.waiting with something more descriptive