Monitor a CLUSTER or VACUUM FULL rewrite
CLUSTER and VACUUM FULL hold ACCESS EXCLUSIVE for the whole rewrite, so the only useful question is how much longer. pg_stat_progress_cluster answers it: tuples scanned mid-run, then all 80,000 written and the index rebuild underway.
Problem
What you're actually looking at
The symptom as it shows up on a real server.
Both commands rewrite the entire table into a new file while nothing else can read it. Once you have started, the only thing that matters is the remaining time, and neither command reports anything until it finishes.
waybill_archive is about 11 MB across 80,000 rows in this lab and is being reorganized in a maintenance window. The window is finite and someone has to decide whether it will fit.
Simple terms
CLUSTER and VACUUM FULL both rewrite the entire table into a fresh file, and they hold the strongest lock the whole time, so nothing else can read it. Once you have started, the only question that matters is how much longer, and neither command says a word until it is done. pg_stat_progress_cluster answers it, showing tuples scanned, then tuples written, then the index rebuild, so you can tell whether it will fit inside your maintenance window.
Full runbook for this incident
- The full identify checklist, the exact signals that tell you it's this incident
- Every diagnostic query; lab output is attached only to the steps we actually captured
- The resolution path and the pitfalls that make it worse
- Mitigation steps to stop it recurring, plus a verify-you're-done query
Card required. Cancel before day 7 and you are not charged.
More in this category
Other Observability runbooks
Neighbouring incidents that share the same diagnostic surface.
Connected
How this connects to the rest of the library
A live view of this page's real cross-references, what explains it, what fixes it, what to tune, and where to go next. Every link is an authored relationship, not a guess.
Fixes these errors
Need the full procedure?
Pro runbooks finish the incident path
Free runbooks teach the shape. Pro opens the full step transcript, edge cases, and prevention depth.