PostgreSQL: Features new in 7.4: pg_autovacuum

  • Multi-versioning requires storing the state of a row on disk
  • Allows rollback/recovery/concurrent use (within Postgres)
  • Problem: 'dead' rows

  • Example: insert 2,000 rows, delete 2,000 rows, insert 1 row: table is 2001 rows large!
  • Free space map
    • max_fsm_pages (default: 20,000)
    • max_fsm_relations (default: 1,000)
  • VACUUM (no parameters): does not require exclusive locking
  • Populate free space map

  • pg_autovacuum: automate VACUUM (and ANALYZE) of relations
  • Monitors relations for updates, deletes, inserts
  • Allows for settings of thresholds/scaling values to determine when to VACUUM a table
  • Problems:
    • Not in vanilla build (see contrib/pg_autovacuum)
    • Does not solve need to VACUUM
    • Requires user to turn on row level statistics collecting in postgresql.conf and resulting performance hit
    • Can only connect to a single instance: cannot manage multiple machines
Prev

Next

Page 13