Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rtnd7-00Ha7Z-Nu for pgsql-admin@arkaria.postgresql.org; Mon, 08 Apr 2024 11:57:42 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1rtnd6-005YvM-Bo for pgsql-admin@arkaria.postgresql.org; Mon, 08 Apr 2024 11:57:40 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rtnd6-005YvD-1C for pgsql-admin@lists.postgresql.org; Mon, 08 Apr 2024 11:57:40 +0000 Received: from jakobs.com ([85.214.83.89] helo=rs.plausibolo.de) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rtnd2-001orU-HG for pgsql-admin@lists.postgresql.org; Mon, 08 Apr 2024 11:57:38 +0000 Received: from localhost (localhost [127.0.0.1]) by rs.plausibolo.de (Postfix) with ESMTP id 059C73801A0; Mon, 8 Apr 2024 13:57:34 +0200 (CEST) Received: from rs.plausibolo.de ([IPv6:::1]) by localhost (h2367442.stratoserver.net [IPv6:::1]) (amavisd-new, port 10024) with ESMTP id CEJbCd1R7ZuP; Mon, 8 Apr 2024 13:57:33 +0200 (CEST) Received: from [192.168.222.97] (unknown [145.253.118.26]) by rs.plausibolo.de (Postfix) with ESMTPSA id 918D638019F; Mon, 8 Apr 2024 13:57:33 +0200 (CEST) Content-Type: multipart/alternative; boundary="------------HPC8enGsOBC0SX5hbtSG0DJM" Message-ID: Date: Mon, 8 Apr 2024 13:57:33 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Dynamic views To: pgsql-admin@lists.postgresql.org References: <1131891051.9514344.1712572662608@mail.yahoo.com> From: Holger Jakobs In-Reply-To: <1131891051.9514344.1712572662608@mail.yahoo.com> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk This is a multi-part message in MIME format. --------------HPC8enGsOBC0SX5hbtSG0DJM Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Am 08.04.24 um 12:37 schrieb Wolfgang Wilhelm: > Hi Rajesh, > > pg_stat_activity shows the actual activity - what is running as DB > tasks on the system. When the process finishes then it will disappear > from that view. No reset needed. pg_stat_database will have new > information with new or deleted databases. So no reset required, too. > More information can be taken from the docs. See > https://www.postgresql.org/docs/current/monitoring-stats.html > > Regards > Wolfgang > > > Am Montag, 8. April 2024 um 09:01:12 MESZ hat Rajesh Kumar > Folgendes geschrieben: > > > Hi all, > > How much time the stats are hold in dynamic stats views such as > pg_stat_activity, pg_stat_database etc? > > Is there a reset point? How to find the last reset time ? pg_stat_activity shows the CURRENT activity ... Deutsch: "aktuell"  is NOT the same as "actual" in English! Using "actual" instead of "current" may confuse other people. -- Holger Jakobs, Bergisch Gladbach, Tel. +49-178-9759012 --------------HPC8enGsOBC0SX5hbtSG0DJM Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit


Am 08.04.24 um 12:37 schrieb Wolfgang Wilhelm:
Hi Rajesh,

pg_stat_activity shows the actual activity - what is running as DB tasks on the system. When the process finishes then it will disappear from that view. No reset needed. pg_stat_database will have new information with new or deleted databases. So no reset required, too.
More information can be taken from the docs. See https://www.postgresql.org/docs/current/monitoring-stats.html

Regards
Wolfgang


Am Montag, 8. April 2024 um 09:01:12 MESZ hat Rajesh Kumar <rajeshkumar.dba09@gmail.com> Folgendes geschrieben:


Hi all,

How much time the stats are hold in dynamic stats views such as pg_stat_activity, pg_stat_database etc?

Is there a reset point? How to find the last reset time ?


pg_stat_activity shows the CURRENT activity ...

Deutsch: "aktuell"  is NOT the same as "actual" in English! Using "actual" instead of "current" may confuse other people.


--

Holger Jakobs, Bergisch Gladbach, Tel. +49-178-9759012

--------------HPC8enGsOBC0SX5hbtSG0DJM--