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 1reeDZ-00CbhH-Lp for pgsql-novice@arkaria.postgresql.org; Mon, 26 Feb 2024 16:52: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 1reeDX-00FFdi-0m for pgsql-novice@arkaria.postgresql.org; Mon, 26 Feb 2024 16:52:39 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1reeDW-00FFdZ-OO for pgsql-novice@lists.postgresql.org; Mon, 26 Feb 2024 16:52:39 +0000 Received: from mail-oo1-xc43.google.com ([2607:f8b0:4864:20::c43]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1reeDU-001D0C-2s for pgsql-novice@lists.postgresql.org; Mon, 26 Feb 2024 16:52:38 +0000 Received: by mail-oo1-xc43.google.com with SMTP id 006d021491bc7-5a095237eefso433461eaf.1 for ; Mon, 26 Feb 2024 08:52:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1708966354; x=1709571154; darn=lists.postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=jUmyYMUWb0Z2ZSFrOXZCvW2p1dEuUSNuWM19M3txm0A=; b=Ni/dBoZCwFYfz9g/lJNDpUsiyOKWFs38h0+4OGvYiy1IAG/IfBV6bHN0Kqz8+72cEr pRuuNKJje1StPVe37YMMDYcxAbU62xEnVAAWz7J4kWgz1pFj2yk+fLnYmOOxF0i+pcZW 2UF9QzQbmSrJRkqv99zWpRKG3jgk8e73t0HXmi/EQpdJrfIxWUNxs+XRLqTk+I4uYFC4 3Zbuskd5+QwJyJoy1aJsBWlnRM3nxbbvGjEn/z9TZSeiO0pPoYR+HjZ6F6gg1rLDTlq6 VkjV2BC1UBRpys/JisKzPrg9DMVAU1HykspFb7XDGAYu+ORfYbfgQu/OM3iiryBtIk/D mIow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708966354; x=1709571154; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=jUmyYMUWb0Z2ZSFrOXZCvW2p1dEuUSNuWM19M3txm0A=; b=ttw4dtXrFMHnWqHwmq114Abersqo24FrTz5KLM2mWD+tj5kgBa1fFDO4SPYgT3mozj ir8JM+747wCcn4flqhcx8y2USHUjOOShTHqLlk7qw5TKRXX0QAYbDY9jgjgZ4rESs1zv 1NnofiZ69NHV4w8u1qnaklTls2AdZqVTZCPjjFl2vAqCw7+MZbL8q1IbHQj8UhdismaX Xhc9Yh9/VAnDi0u9DGEvOoeLM98Tq1pP3+rrlDLVKKCXiF022XZj/w5mqjuusklpxORO 6rh5+wtPvUMThRG63n2o18ZBXjJ95nQVlmEm0uwrDF4FVYkeQ/FKfWfhRZjbEo2YSnGm 4zfw== X-Gm-Message-State: AOJu0YyEGL/7ic4lNVlD5x0sHjiyp5zLpJ2BwKlk/5pdnvLEjhuhkwEA Y4wTMeGRutaUhvAzl/TDw0po8x4OnR3wJIjMomV1IfKfeQtHSl1Vq1A6JyrYhByMcKBgXkXBYdV 8vAwtFgjsw4sbed5nRrQCwUg+tAs= X-Google-Smtp-Source: AGHT+IFy1RlS/cAarNs1O7inAyQy/tTv5B+umcgGkp3XLFwWmdXi/fZ6c/5uFFMT3XDzKW8zXg1vcgZcuK9jp9V5SQ8= X-Received: by 2002:a05:6870:d38b:b0:21f:4267:7983 with SMTP id k11-20020a056870d38b00b0021f42677983mr8511400oag.49.1708966354062; Mon, 26 Feb 2024 08:52:34 -0800 (PST) MIME-Version: 1.0 References: <0491db9ee6796afacb53a52c43e9f4905e49a188.camel@cybertec.at> In-Reply-To: <0491db9ee6796afacb53a52c43e9f4905e49a188.camel@cybertec.at> From: blockdump Date: Mon, 26 Feb 2024 17:52:24 +0100 Message-ID: Subject: Re: Reset date for Cumulative Statistics System when not in table To: Laurenz Albe Cc: pgsql-novice@lists.postgresql.org Content-Type: multipart/alternative; boundary="000000000000778f8006124bbc26" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000778f8006124bbc26 Content-Type: text/plain; charset="UTF-8" Thank you so much for the info! On Mon, Feb 26, 2024, 16:40 Laurenz Albe wrote: > On Mon, 2024-02-26 at 14:47 +0100, blockdump wrote: > > I am new to Postgres and started reading about the The Cumulative > Statistics System. > > > https://www.postgresql.org/docs/current/monitoring-stats.html#MONITORING-PG-STATIO-ALL-TABLES-VIEW > > > > When I came across pg_statio_all_tables I was wondering what is the > reference date for the > > counters like (heap_blks_read, heap_blks_hit ... ) This table does not > have a stats_reset column like others. > > So are this numbers accumulating from the creation of the table or since > the startup of the cluster ? > > > > Maybe someone can drop me a line. > > Statistics survive a restart, but not a crash, so the statistics are > collected since the table was created, the latest crash happened or the > statistics were reset; whatever happened last. > > Unfurtunately there is no way to find out the time when that happened. > > Yours, > Laurenz Albe > --000000000000778f8006124bbc26 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Thank you so much for the info!=C2=A0

On Mon, Feb 26, 2024= , 16:40 Laurenz Albe <lauren= z.albe@cybertec.at> wrote:
O= n Mon, 2024-02-26 at 14:47 +0100, blockdump wrote:
> I am new to Postgres and started reading about the=C2=A0The Cumulative= Statistics System.=C2=A0
> https://www.postgresql.org/docs/current/monitoring-stats.html= #MONITORING-PG-STATIO-ALL-TABLES-VIEW
>
> When I came across pg_statio_all_tables I was wondering what is the re= ference date for the
> counters like (heap_blks_read,=C2=A0heap_blks_hit ... ) This table doe= s not have a=C2=A0stats_reset column like others.=C2=A0
> So are this numbers accumulating from the creation of the table or sin= ce the startup of the cluster=C2=A0?
>
> Maybe someone can drop me a line.

Statistics survive a restart, but not a crash, so the statistics are
collected since the table was created, the latest crash happened or the
statistics were reset; whatever happened last.

Unfurtunately there is no way to find out the time when that happened.

Yours,
Laurenz Albe
--000000000000778f8006124bbc26--