Re: Add sub-transaction overflow status in pg_stat_activity - Mailing list pgsql-hackers

From Robert Haas
Subject Re: Add sub-transaction overflow status in pg_stat_activity
Date
Msg-id CA+Tgmoa=d2PHPG-OZUBeLk+RzcRcv+Tapm6um=MKn6MvT2XLsg@mail.gmail.com
Whole thread Raw
In response to Re: Add sub-transaction overflow status in pg_stat_activity  ("David G. Johnston" <david.g.johnston@gmail.com>)
List pgsql-hackers
On Mon, Nov 14, 2022 at 11:18 AM David G. Johnston
<david.g.johnston@gmail.com> wrote:
>> 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"
isgoing to be seldom consulted.  In fact, I would rather think it is always briefly consulted to confirm it has the
expectedvalue of "false" (blank, IMO, don't show anything in that column unless it is exceptional) and the presence of
avalue there would draw attention to the desired fact that something is wrong and warrants further investigation.  The
pg_stat_activityview seems like the perfect place to at least display that exception flag. 

OK, thanks for voting. I take that as +1 for putting it in
pg_stat_activity proper, which is also my preferred approach.

However, a slight correction: it doesn't inform you that your session
has degraded performance. It informs you that your session may be
degrading everyone else's performance.

--
Robert Haas
EDB: http://www.enterprisedb.com



pgsql-hackers by date:

Previous
From: "David G. Johnston"
Date:
Subject: Re: Add sub-transaction overflow status in pg_stat_activity
Next
From: Amit Singh
Date:
Subject: Re: Add sub-transaction overflow status in pg_stat_activity