Re: pg_stat_all_tables.last_vacuum not always correct.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Kathleen Emerson <heavylivestock(at)gmail(dot)com>
Cc: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: pg_stat_all_tables.last_vacuum not always correct.
Date: 2018-10-30 15:31:51
Message-ID: 30798.1540913511@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Kathleen Emerson <heavylivestock(at)gmail(dot)com> writes:
> I ran `VACUUM VERBOSE` on 10-28. After the VACUUM completed, I ran the
> query
> `SELECT relname, last_vacuum FROM pg_stat_all_tables ORDER BY 2;`
> [ and saw old timestamps for some ]
> So, at least according to the VERBOSE logs, it seems like these tables
> _were_ vacuumed. Why the discrepancy?

The pg_stats mechanism is designed to drop messages when under sufficient
load, so if there was a whole lot going on besides the VACUUM, maybe
that would explain it.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message GPT 2018-10-30 16:15:01 Re: rw_redis_fdw: SQL Errors when statement is within a function
Previous Message Stephen Frost 2018-10-30 15:26:27 Re: Portworx snapshots