Re: Add connection active, idle time to pg_stat_activity

From: Dilip Kumar <dilipbalaut(at)gmail(dot)com>
To: Rafia Sabih <rafia(dot)pghackers(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Add connection active, idle time to pg_stat_activity
Date: 2021-11-26 08:27:28
Message-ID: CAFiTN-vC8zSdChTR4HSmjH+r4AtyN0J7jPTTbtggKLPa0hi8og@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Nov 16, 2021 at 5:06 PM Rafia Sabih <rafia(dot)pghackers(at)gmail(dot)com> wrote:
> > I think this change is wrong, basically, "tsmsg->m_idle_in_xact_time"
> > is used for counting the database level idle in transaction count, you
> > can check "pg_stat_get_db_idle_in_transaction_time" function for that.
> > So "pgStatTransactionIdleTime" is the variable counting the idle in
> > transaction time, pgStatIdleTime is just counting the idle time
> > outside the transaction so if we make this change we are changing the
> > meaning of tsmsg->m_idle_in_xact_time.
>
> Got it.
> Updated

Okay, thanks, I will look into it one more time early next week and if
I see no issues then I will move it to RFC.

--
Regards,
Dilip Kumar
EnterpriseDB: http://www.enterprisedb.com

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Daniel Gustafsson 2021-11-26 09:12:30 Re: Windows build warnings
Previous Message Nikolay Shaplov 2021-11-26 08:19:16 Re: Suggestion: Unified options API. Need help from core team