Re: Add sub-transaction overflow status in pg_stat_activity

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Justin Pryzby <pryzby(at)telsasoft(dot)com>, Andres Freund <andres(at)anarazel(dot)de>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Julien Rouhaud <rjuju123(at)gmail(dot)com>, "Bossart, Nathan" <bossartn(at)amazon(dot)com>, Dilip Kumar <dilipbalaut(at)gmail(dot)com>, Ashutosh Sharma <ashu(dot)coek88(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Add sub-transaction overflow status in pg_stat_activity
Date: 2022-11-14 16:17:46
Message-ID: CAKFQuwaCzz4Dket=Uu_7zAzg+x9cnXfsJC_db585pXAXLPcs9A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Nov 14, 2022 at 9:04 AM Robert Haas <robertmhaas(at)gmail(dot)com> wrote:

> On Mon, Nov 14, 2022 at 10:57 AM Justin Pryzby <pryzby(at)telsasoft(dot)com>
> wrote:
> > > First, we're just talking about an extra couple of columns in
> > > pg_stat_activity here, which does not seem like a heavy price to pay.
> >
> > The most recent patch adds a separate function rather than adding more
> > columns to pg_stat_activity. I think the complaint about making that
> > view wider for infrequently-used columns is entirely valid.
>
> I guess that's OK. I don't particularly favor that approach here but I
> can live with it. I agree that too-wide views are annoying, but as far
> as pg_stat_activity goes, that ship has pretty much sailed already,
> and the same is true for a lot of other views. Inventing a one-off
> solution for this particular case doesn't seem particularly warranted
> to me but, again, I can live with it.
>
>
I can see putting counts that people would want to use for statistics
elsewhere but IIUC the whole purpose of "overflowed" is to inform someone
that their session presently has degraded performance because it has
created too many subtransactions. Just because the "degraded" condition
itself is rare doesn't mean the field "is my session degraded" is going to
be seldom consulted. In fact, I would rather think it is always briefly
consulted to confirm it has the expected value of "false" (blank, IMO,
don't show anything in that column unless it is exceptional) and the
presence of a value there would draw attention to the desired fact that
something is wrong and warrants further investigation. The
pg_stat_activity view seems like the perfect place to at least display that
exception flag.

David J.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2022-11-14 16:28:25 Re: Add sub-transaction overflow status in pg_stat_activity
Previous Message Robert Haas 2022-11-14 16:04:14 Re: Add sub-transaction overflow status in pg_stat_activity