Postgresql table not auto vacuumed
warning

Description Table {{ $labels.relname }} has not been auto vacuumed for 10 days
Query
>>>
	
				
					((
				
			
				
					
				
			
				
					 + 
				
			
				
					
				
			
				
					 + 
				
			
				
					
				
			
				
					) > 
				
			
				
					
				
			
				
					) and (
				
			
				
					
					
						time
					
				
			
				
					() - 
				
			
				
					
				
			
				
					) > 60 * 60 * 24 * 10
				
			
    
Query Explanation

The rule adds the deleted, updated, and HOT‑updated row counts for each user table (pg_stat_user_tables_n_tup_del + pg_stat_user_tables_n_tup_upd + pg_stat_user_tables_n_tup_hot_upd) and checks if this total exceeds the configured autovacuum vacuum threshold (pg_settings_autovacuum_vacuum_threshold). If that condition is true and the time since the table’s last autovacuum (time() - pg_stat_user_tables_last_autovacuum) is greater than 10 days (60 * 60 * 24 * 10 seconds), the alert fires.

Get Alert
Download
Copy to Clipboard