Movatterモバイル変換


[0]ホーム

URL:



Facebook
Postgres Pro
Facebook
Downloads
65.3. Free Space Map
Prev UpChapter 65. Database Physical StorageHome Next

65.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 stored alongside the main relation data in a separate relation fork, named after the filenode number of the relation, plus a_fsm suffix. For example, if the filenode of a relation is 12345, theFSM is stored in a file called12345_fsm, in the same directory as the main relation file.

The Free Space Map is organized as a tree ofFSM pages. The bottom levelFSM pages store the free space available on each heap (or index) page, using one byte to represent each such page. The upper levels aggregate information from the lower levels.

Within eachFSM page is a binary tree, stored in an array with one 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's values is stored. The maximum value in the leaf nodes is therefore stored at the root.

Seesrc/backend/storage/freespace/README for more details on how theFSM is structured, and how it's updated and searched. Thepg_freespacemap module can be used to examine the information stored in free space maps.


Prev Up Next
65.2. TOAST Home 65.4. Visibility Map
pdfepub
Go to PostgreSQL 17
By continuing to browse this website, you agree to the use of cookies. Go toPrivacy Policy.

[8]ページ先頭

©2009-2025 Movatter.jp