## 70.3. Free Space Map[]()[]()Each heap and index relation, except for hash indexes, has a Free Space Map(FSM) to keep track of available space in the relation. It's storedalongside the main relation data in a separate relation fork, named after thefilenode number of the relation, plus a `_fsm` suffix. For example,if the filenode of a relation is 12345, the FSM is stored in a file called`12345_fsm`, in the same directory as the main relation file.The Free Space Map is organized as a tree of FSM pages. Thebottom level FSM pages store the free space available on eachheap (or index) page, using one byte to represent each such page. The upperlevels aggregate information from the lower levels.Within each FSM page is a binary tree, stored in an array withone byte per node. Each leaf node represents a heap page, or a lower levelFSM page. In each non-leaf node, the higher of its children'svalues is stored. The maximum value in the leaf nodes is therefore storedat the root.See `src/backend/storage/freespace/README` for more details onhow the FSM is structured, and how it's updated and searched.The [pg\_freespacemap](pgfreespacemap.html) modulecan be used to examine the information stored in free space maps.