Changes between Version 14 and Version 15 of FAQ

Show
Ignore:
Timestamp:
03/13/06 19:21:00 (13 years ago)
Author:
anonymous
Comment:

a bit more info on the need to VACUUM with Postgres

Legend:

Unmodified
Added
Removed
Modified
  • FAQ

    v14 v15  
    135135 Explanation:  If you run VACUUM ANALYZE regularily (every night or every hour) you shouldn't need VACUUM FULL ANALYZE. However, if you haven't run VACUUM ANALYZE for a long time, you have to run VACUUM FULL ANALYZE once. 
    136136 
    137  What happens is that without VACUUMing the connection and node tables grows and grows (because they are written to frequently, and postgres being a true ACID database, keep past versions of tuples to insure read consistency).  Simply vacuuming doesn't reclaim the space used by old tuples, it just makes them available for reuse.  If you haven't run VACUUM in a long time, you probably have millions of free tuples that you would, never, ever use up in a single day.  VACUUM FULL ANALYZE fixes that. 
     137 What happens is that without VACUUMing the connection and node tables grows and grows (because they are written to frequently, and postgres being a true ACID database, keep past versions of tuples to insure read consistency).  Simply vacuuming doesn't reclaim the space used by old tuples, it just makes them available for reuse.  If you haven't run VACUUM in a long time, you probably have millions of free tuples that you would, never, ever use up in a single day.  VACUUM FULL ANALYZE fixes that. You must also run VACUUM once every two billions transactions in order to avoid causing the transaction id (XID) counter to wraparound -- for more information, see the PostgreSQL docs on [http://www.postgresql.org/docs/8.1/static/maintenance.html#ROUTINE-VACUUMING routine database maintenance]. 
     138 
     139 An alternative to running periodic VACUUMs is to enable the [http://www.postgresql.org/docs/8.1/static/maintenance.html#AUTOVACUUM autovacuum daemon] in recent versions of PostgreSQL: then PostgreSQL will automatically vacuum the database when it would be appropriate. 
    138140 
    139141== Q: There are error messages displayed on the portal pages ==