April 2018
Intermediate to advanced
508 pages
15h 22m
English
One of the major problems in PostgreSQL versions up to 8.3 is that the Free Space Map (FSM) is stored in shared memory, and is of a fixed size. If your database has a large number of deletions, updates, and/or rollbacks in between when a manual or automatic VACUUM runs, it's possible for this FSM to run out of room and therefore not be able to track additional free space. This can quickly lead to catastrophic amounts of table and index bloat.
You can track how much of the FSM is being used only through watching the output of manual vacuums. Here is an example showing the information provided by an 8.3 server:
postgres=# VACUUM VERBOSE; INFO: free space map contains 49 pages in 62 relations DETAIL: A total of 992 page slots ...
Read now
Unlock full access