Bill,
> 1) When is it necessary to run REINDEX or drop/create
> an index? All I could really find in the docs is:
If you need to VACUUM FULL, you need to REINDEX as well. For example, if you
drop millions of rows from a table.
> 2) If reindexing is necessary, how can this be done in
> a non-obtrusive way in a production environment. Our
> database is being updated constantly. REINDEX locks
> client apps out while in progress. Same with "CREATE
> INDEX" when we drop/create. The table can have over
> 10 million row. Recreating the indexes seems to take
> hours. This is too long to lock the client apps out.
> Is there any other solution?
Better to up your max_fsm_pages and do regular VACUUMs regularly and
frequently so that you don't have to REINDEX at all.
--
--Josh
Josh Berkus
Aglio Database Solutions
San Francisco