Re: Add connection active, idle time to pg_stat_activity - Mailing list pgsql-hackers

From David G. Johnston
Subject Re: Add connection active, idle time to pg_stat_activity
Date
Msg-id CAKFQuwZ920iekwcwWP7WUHd8LRi2H6H_E1dZEmrHG68364PaFQ@mail.gmail.com
Whole thread Raw
In response to Re: Add connection active, idle time to pg_stat_activity  (Andres Freund <andres@anarazel.de>)
Responses Re: Add connection active, idle time to pg_stat_activity
List pgsql-hackers
On Tue, Nov 8, 2022 at 7:37 PM Andres Freund <andres@anarazel.de> wrote:
On 2022-11-08 19:25:27 -0700, David G. Johnston wrote:
> Actually two, because I also suggest that not only is the duration recorded,
> but a counter be incremented each time a given state becomes the currently
> active state.  Seems like having access to a divisor of some form may be
> useful.

What for?

Because 5 hours of idle-in-transaction time in a single block means something different than the same 5 hours accumulated across 300 mini-idles.

David J.

pgsql-hackers by date:

Previous
From: Thomas Munro
Date:
Subject: Re: Collation version tracking for macOS
Next
From: Kyotaro Horiguchi
Date:
Subject: Re: Improve logging when using Huge Pages