Hi all,
I am wondering if autovacuum will periodically rebuild indexes?
If not, how advisable is it to reindex periodically?
We recently had a case of unique index corruption which ended up allowing duplicate
primary key IDs to get inserted and caused widespread data model integrity havoc.
The system ran for several days before it was noticed.
After the problem was discovered we found that a reindex would fail because there were
duplicate ID values.
Our thought is that if we had a scheduled cron job that would periodically do a reindex this
corruption might have been caught sooner by detecting the reindex failure.
If a reindex is something that should be done frequently as part of regular maintenance
why isn't there a mode of autovacuum that does this automatically? Or maybe there is and
I just don't know about it..?
Thank you.