What happened
Three small inaccuracies in skills/supabase-postgres-best-practices/references/monitor-vacuum-analyze.md:
1. VACUUM description overstates what plain VACUUM does
Outdated statistics cause the query planner to make poor decisions. VACUUM reclaims space, ANALYZE updates statistics.
Plain VACUUM marks dead tuples reusable within the relation — it does not necessarily return disk space to the OS (that is VACUUM FULL). "reclaims space" reads as the latter.
2. "Last analyzed" query can surface a stale timestamp
select
relname, last_vacuum, last_autovacuum, last_analyze, last_autoanalyze
from pg_stat_user_tables
order by last_analyze nulls first;
Reading/ordering by last_analyze alone can show an older manual ANALYZE even when autovacuum analyzed the table more recently. greatest(last_analyze, last_autoanalyze) reflects the actual most-recent analyze.
3. Mislabeled autovacuum "status" check
-- Check autovacuum status
select * from pg_stat_progress_vacuum;
pg_stat_progress_vacuum only reports currently-running VACUUM/autovacuum workers — it is empty when nothing is running, so it does not describe overall autovacuum status.
Source
File: skills/supabase-postgres-best-practices/references/monitor-vacuum-analyze.md
Sections: intro sentence; the "Check when tables were last analyzed" query; the "Check autovacuum status" snippet.
Fix suggestion
Reword the intro to "VACUUM reclaims dead tuples and makes space reusable", switch the query to greatest(last_analyze, last_autoanalyze) in the select list and ordering, and relabel the last snippet as a live vacuum/autovacuum activity check. PR follows.
What happened
Three small inaccuracies in
skills/supabase-postgres-best-practices/references/monitor-vacuum-analyze.md:1. VACUUM description overstates what plain
VACUUMdoesPlain
VACUUMmarks dead tuples reusable within the relation — it does not necessarily return disk space to the OS (that isVACUUM FULL). "reclaims space" reads as the latter.2. "Last analyzed" query can surface a stale timestamp
Reading/ordering by
last_analyzealone can show an older manual ANALYZE even when autovacuum analyzed the table more recently.greatest(last_analyze, last_autoanalyze)reflects the actual most-recent analyze.3. Mislabeled autovacuum "status" check
pg_stat_progress_vacuumonly reports currently-running VACUUM/autovacuum workers — it is empty when nothing is running, so it does not describe overall autovacuum status.Source
File:
skills/supabase-postgres-best-practices/references/monitor-vacuum-analyze.mdSections: intro sentence; the "Check when tables were last analyzed" query; the "Check autovacuum status" snippet.
Fix suggestion
Reword the intro to "VACUUM reclaims dead tuples and makes space reusable", switch the query to
greatest(last_analyze, last_autoanalyze)in the select list and ordering, and relabel the last snippet as a live vacuum/autovacuum activity check. PR follows.