Re: What is pg_stat_user_tables Showing NULL for last_autoanalyze &last_autovacuum - Mailing list pgsql-performance

From Justin Pryzby
Subject Re: What is pg_stat_user_tables Showing NULL for last_autoanalyze &last_autovacuum
Date
Msg-id 20190227161556.GD28750@telsasoft.com
Whole thread Raw
In response to What is pg_stat_user_tables Showing NULL for last_autoanalyze &last_autovacuum  (Fd Habash <fmhabash@gmail.com>)
Responses RE: What is pg_stat_user_tables Showing NULL for last_autoanalyze&last_autovacuum  (Fd Habash <fmhabash@gmail.com>)
List pgsql-performance
On Wed, Feb 27, 2019 at 09:47:13AM -0500, Fd Habash wrote:
> I have been able to locate four google search results with the same inquiry. What’ve been able to understand is …
> 
> 1. If auto-vaccum is working as expected, stats collector does not nullify these values as part of a startup sequence
orregular Maitenance. If a relation gets auto[vacuumed|analyzed], the timestamps should remain.
 
> 2. A database engine crash or restart with ‘immediate’ option will cause the timestamps to nullify. 
> 3. Table never qualified for vacuuming based on auto-vacuum settings. 

Can you give an example ?

If it's an empty inheritence parent (relkind=r), then it won't trigger
autovacuum/analyze thresholds (but you should analyze it manually).

Note that relkind=p "partitioned" tables don't have entries at all.
https://www.postgresql.org/message-id/flat/20180503141430.GA28019%40telsasoft.com

If it's never DELETEd from, then it won't trigger autovacuum (but may trigger
autoanalyze).

Justin


pgsql-performance by date:

Previous
From: Fd Habash
Date:
Subject: What is pg_stat_user_tables Showing NULL for last_autoanalyze &last_autovacuum
Next
From: Laurenz Albe
Date:
Subject: Re: What is pg_stat_user_tables Showing NULL for last_autoanalyze &last_autovacuum