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

From Rafia Sabih
Subject Re: Add connection active, idle time to pg_stat_activity
Date
Msg-id CA+FpmFcOjbC1MdJFt--EL85pG4v2uXZkhjevPqogBNvZ5aQWbA@mail.gmail.com
Whole thread Raw
In response to Re: Add connection active, idle time to pg_stat_activity  (Richard Guo <guofenglinux@gmail.com>)
List pgsql-hackers


On Thu, 10 Apr 2025 at 18:41, Richard Guo <guofenglinux@gmail.com> wrote:
On Fri, Apr 11, 2025 at 3:47 AM Robert Haas <robertmhaas@gmail.com> wrote:
> I'd probably write the increments as ++ rather than += 1 but I'm not
> sure if everyone would agree.

I'm a fan of ++ as well, so I agree.

Thanks
Richard


Looking at this patch and the idea altogether I have other thoughts on this now.
Thinking about the original problem of having a count of total idle in transaction time, seems unnecessary with the availability of state_change timestamp along with state columns in pg_stat_activity.

--
Regards,
Rafia Sabih
CYBERTEC PostgreSQL International GmbH

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: generating function default settings from pg_proc.dat
Next
From: Nathan Bossart
Date:
Subject: Re: Speed up COPY FROM text/CSV parsing using SIMD