Re: last_analyze/last_vacuum in pg_stat_all_tables (PG 17.10) - Mailing list pgsql-general

From Laurenz Albe
Subject Re: last_analyze/last_vacuum in pg_stat_all_tables (PG 17.10)
Date
Msg-id 8cb047c8327ca195c635460e4e509d69a4bad3ed.camel@cybertec.at
Whole thread
In response to last_analyze/last_vacuum in pg_stat_all_tables (PG 17.10)  (Thomas Michael Engelke <thomas.engelke@posteo.de>)
List pgsql-general
On Fri, 2026-07-03 at 10:20 +0000, Thomas Michael Engelke wrote:
> What happens *sometimes* on servers is that the age of the oldest
> maintenance increases to infinity, as the fields of last_analyze and
> last_vacuum are emptied (NULL value).
>
> However, looking into the monitoring system I can see that there must
> have been values in these fields before. I can see the values coming
> ouf of that check 2 hours ago, the values were not infinity.
>
> Are there any circumstances under which these fields get emptied?

A crash of the database server would do that.

Also, if somebody calls pg_stat_reset() or
pg_stat_reset_single_table_counters('table_name'), that would reset
these counters.

Yours,
Laurenz Albe



pgsql-general by date:

Previous
From: rob stone
Date:
Subject: Re: Get version info
Next
From: Adrian Klaver
Date:
Subject: Re: Get version info