autovacuum
With vacuum being so critical to performance, automating it as much as possible has been one of the most regularly improved aspects of the database during the last few years of development. Major advancements include:
- 7.3, 7.4, 8.0: autovacuum is available as a contrib module (
contrib/pg_autovacuum
). It requires custom scripting to keep it running all the time. - 8.1: The autovacuum daemon is introduced as a distinct process managed by the server, always running whenever the server is enabled.
- 8.2: Last vacuum and last analyze times are saved to
pg_stat_all_tables
so that you can monitor activity better. - 8.3: autovacuum is turned on by default, and it can run multiple workers at once. Additional log detail is possible via
log_autovacuum_min_duration
. - 8.4: Disk-based free-space map means no
max_fsm_pages
overflow. Control of per-table behavior is switched to use table storage parameters.
Also note that in versions before 8.3 when it became enabled by default, running autovacuum...