Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

After reading the Postgresql documentation, we found that it's recommendable to run the Vacuum tasks daily:

We recommend that active production databases be vacuumed frequently (at least nightly), in order to remove dead rows.

Nonetheless, we're considering running the Reindex tasks in a daily basis too, but we're concerned about the possible implications of doing it (maybe the database size could increase as a consequence of the daily reindex, for example)

How often do you run the Vacuum tasks in your DBs?

How often do you run the Reindex tasks in your DBs?

What do we have to consider when reindexing the DBs (which kind of negative consequences could it brings?)

share|improve this question

1 Answer 1

How often do you run the Vacuum tasks in your DBs?

All the time (with autovacuum=on) and also weekly with vacuumdb -avz, logging output to file.

How often do you run the Reindex tasks in your DBs?

Only when needed. To check if it is needed see -> http://bucardo.org/check_postgres/check_postgres.pl.html#bloat, http://wiki.postgresql.org/wiki/Show_database_bloat

What do we have to consider when reindexing the DBs (which kind of negative consequences could it brings?)

Unneeded I/O, unneeded locking.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.