Rebuild a bloated index with REINDEX CONCURRENTLY
Indexes bloat too. REINDEX INDEX CONCURRENTLY rebuilds an index without blocking reads and writes, here a bloated index shrinks from 19 MB to 4,832 kB.
Problem
What you're actually looking at
The symptom as it shows up on a real server.
B-tree indexes accumulate bloat under churn just like tables. A bloated index is slower to scan and wastes cache. REINDEX rebuilds it compactly; the CONCURRENTLY form does so without holding a lock that blocks the application.
Meridian's idx_routing_sort has bloated to 19 MB after heavy update churn. The index needs rebuilding, but the table is live, so a blocking REINDEX is not an option.
Simple terms
Indexes get bloated the same way tables do: heavy update churn leaves them fat and slow to scan. REINDEX rebuilds an index compactly, but the plain form locks the table while it works. The CONCURRENTLY version does the rebuild in the background without blocking reads and writes, so you can shrink a bloated index on a live table without taking an outage.
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 Vacuum & bloat 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.
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.