An approximate nearest neighbor index is a physical data structure, not a logical view. When a row's vector changes or a row disappears, the extension either writes a new entry and leaves the old one in place, or marks the old entry dead. Search still works, which is exactly why the problem is easy to miss. A degraded index returns ten plausible neighbors and never reports that four of the correct ones were omitted; there is no error, log line or alert when that happens (pg_recall_guard docs).
The two index types degrade differently.
HNSW builds a layered proximity graph. New vectors become new nodes connected to nearby nodes at insert time. Deleted vectors leave tombstones: the node stays in the graph, still consuming memory and traversal time, until vacuum removes it. Over time the graph's connectivity reflects a history of inserts rather than the current distribution of data, so a query path can wander through nodes that no longer correspond to live rows. HNSW is also the more expensive of the two to build: it is slower to construct and uses more memory than IVFFlat (Crunchy Data).
IVFFlat partitions vectors into lists around centroids computed at build time. Each list records which rows belong to which centroid. The centroids are fixed when the index is created, so as rows are added and deleted, lists drift out of balance: some grow far beyond their original share and others shrink. A query probes only the nearest lists centroids, and if the true nearest neighbors have migrated into an under-probed list, they are missed. This is why IVFFlat should be built after the table already holds a representative sample of data, and why a growing table eventually needs a new centroid set (Tiger Data).
A comparison of what maintenance can and cannot fix:
| Symptom | VACUUM helps | REINDEX needed |
|---|---|---|
| Dead tuples from deleted rows | Yes, reclaims space | Only if tombstones remain in the graph |
| Index size far above live row count | Partially | Yes, rebuild compacts the structure |
| HNSW graph connectivity skewed by history | No | Yes |
| IVFFlat lists out of balance after growth | No | Yes, or rebuild with new list count |
| Recall drop against ground truth | No | Yes |
There is a third effect: insert cost grows. HNSW insertion means finding neighbors and linking, which gets slower as the graph densifies. If builds become unmanageable, the pgvector maintainer recommends smaller types such as halfvec or binary quantization with re-ranking to shrink index size, and dropping ef_construction back toward its default to build faster (pgvector issue #822).



