Re: last_analyze/last_vacuum in pg_stat_all_tables (PG 17.10)

From: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
To: Thomas Michael Engelke <thomas(dot)engelke(at)posteo(dot)de>, "pgsql-general(at)lists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: last_analyze/last_vacuum in pg_stat_all_tables (PG 17.10)
Date: 2026-07-05 13:12:57
Message-ID: 8cb047c8327ca195c635460e4e509d69a4bad3ed.camel@cybertec.at
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2026-07-05 14:53:04 Re: Get version info
Previous Message rob stone 2026-07-05 08:18:14 Re: Get version info