If you really want to get deep into just what's happening with the disk space use on your server, there are a few more PostgreSQL contrib modules that provide additional information available:
- pgstattuple: Maybe you don't trust the running estimates for dead rows that the database is showing. Or perhaps you just want to see how they are distributed. This information and lots of other tuple-level data is available via the pgstattuple module. The module includes functions to give detailed analysis of both regular row tuple data and index pages, which lets you dig into trivia, such as exactly how the B-tree indexes on your server were built.
- pg_freespacemap: This lets you look at each page of a relation (table or index) and see what's in the FSM for them. The data provided is a bit different in 8.4, where the FSM was rewritten, than it is in earlier versions. There is an example of using this utility inside of the Nagios check_postgres utility, a program discussed more in Chapter 11, Database Activity and Statistics.