{"Entry":{"collection":"storage","key":"storage-fsm","name":"Free Space Map","aliases":[],"metadata":{"aliases":[],"category":"Physical structures","content_hash":"42ef3c4a3ac97a9c70027c04352e6eb5bb77dac0dbb131f198931b418dc4e1f5","imported_at":"2026-09-30T00:40:47.091203+08:00","name":"Free Space Map","name_zh":"","slug":"storage-fsm","summary":"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, the FSM is stored in a file called 12345_fsm , in the same directory as the main relation file."}},"Definition":{"Collection":"storage","Key":"storage-fsm","SourceDatabase":"center","Version":"18","SourceTable":"storage_structure","SourceKey":"storage-fsm","SourceRevision":"555610c24d53e4316da5b7d3fc25c279d96856d5e0e23ee308c328c5fa881d9f","Facts":{"comparison_data":{"layouts":[]},"comparison_hash":"27341929154bfb55531f03501322b65af719c5561f3c4ddc9528a14aa4df69b5","description":["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, the FSM is stored in a file called 12345_fsm , in the same directory as the main relation file."],"facts":[{"label":"Definition scope","value":"Same-version core physical storage documentation"}],"manual_html":"\u003cdiv class=\"sect1\"\u003e\n\u003cdiv class=\"titlepage\"\u003e\n\u003cdiv\u003e\n\u003cdiv\u003e\n\u003ch2 class=\"title\"\u003e66.3. Free Space Map \u003c/h2\u003e\n\u003c/div\u003e\n\u003c/div\u003e\n\u003c/div\u003e\n\u003cp\u003eEach 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 \u003ccode class=\"literal\"\u003e_fsm\u003c/code\u003e suffix. For example, if the filenode of a relation is 12345, the FSM is stored in a file called \u003ccode class=\"filename\"\u003e12345_fsm\u003c/code\u003e, in the same directory as the main relation file.\u003c/p\u003e\n\u003cp\u003eThe Free Space Map is organized as a tree of FSM pages. The bottom level FSM 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.\u003c/p\u003e\n\u003cp\u003eWithin each FSM page is a binary tree, stored in an array with one byte per node. Each leaf node represents a heap page, or a lower level FSM 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.\u003c/p\u003e\n\u003cp\u003eSee \u003ccode class=\"filename\"\u003esrc/backend/storage/freespace/README\u003c/code\u003e for more details on how the FSM is structured, and how it's updated and searched. The \u003ca class=\"xref\" href=\"/docs/18/pgfreespacemap.html\" title=\"F.27. pg_freespacemap — examine the free space map\"\u003epg_freespacemap\u003c/a\u003e module can be used to examine the information stored in free space maps.\u003c/p\u003e\n\u003c/div\u003e","manual_path":"/docs/18/storage-fsm.html","related":[{"label":"Table AM","url":"/wiki/tableam/?v=18"},{"label":"Storage Parameters","url":"/wiki/relopts/?v=18"}],"release":{"channel":"stable","label":"18.6","major":"18","ref":"https://ftp.postgresql.org/pub/source/v18.6/postgresql-18.6.tar.bz2","revision":"555610c24d53e4316da5b7d3fc25c279d96856d5e0e23ee308c328c5fa881d9f"},"sections":[],"signature":"","sources":[{"label":"PostgreSQL 18 English manual","path":"storage-fsm.html","sha256":"34a44d3fed151d4552d4e195e24cd7057beae246905423bfd396f875f9f86388","url":"/docs/18/storage-fsm.html"}],"tables":[]},"ManualEvidence":{"manual_path":"/docs/18/storage-fsm.html","release":{"channel":"stable","label":"18.6","major":"18","ref":"https://ftp.postgresql.org/pub/source/v18.6/postgresql-18.6.tar.bz2","revision":"555610c24d53e4316da5b7d3fc25c279d96856d5e0e23ee308c328c5fa881d9f"},"sources":[{"label":"PostgreSQL 18 English manual","path":"storage-fsm.html","sha256":"34a44d3fed151d4552d4e195e24cd7057beae246905423bfd396f875f9f86388","url":"/docs/18/storage-fsm.html"}]},"MeasuredEvidence":{}},"Text":{"Collection":"storage","Key":"storage-fsm","SourceDatabase":"center","Version":"18","Locale":"en","Title":"Free Space Map","Summary":"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, the FSM is stored in a file called 12345_fsm , in the same directory as the main relation file.","BodyHTML":"\u003cdiv\u003e\n\u003cdiv\u003e\n\u003cdiv\u003e\n\u003cdiv\u003e\n\u003ch2\u003e66.3. Free Space Map \u003c/h2\u003e\n\u003c/div\u003e\n\u003c/div\u003e\n\u003c/div\u003e\n\u003cp\u003eEach heap and index relation, except for hash indexes, has a Free Space Map (FSM) to keep track of available space in the relation. It\u0026#39;s stored alongside the main relation data in a separate relation fork, named after the filenode number of the relation, plus a \u003ccode\u003e_fsm\u003c/code\u003e suffix. For example, if the filenode of a relation is 12345, the FSM is stored in a file called \u003ccode\u003e12345_fsm\u003c/code\u003e, in the same directory as the main relation file.\u003c/p\u003e\n\u003cp\u003eThe Free Space Map is organized as a tree of FSM pages. The bottom level FSM 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.\u003c/p\u003e\n\u003cp\u003eWithin each FSM page is a binary tree, stored in an array with one byte per node. Each leaf node represents a heap page, or a lower level FSM page. In each non-leaf node, the higher of its children\u0026#39;s values is stored. The maximum value in the leaf nodes is therefore stored at the root.\u003c/p\u003e\n\u003cp\u003eSee \u003ccode\u003esrc/backend/storage/freespace/README\u003c/code\u003e for more details on how the FSM is structured, and how it\u0026#39;s updated and searched. The \u003ca href=\"/docs/18/pgfreespacemap.html\" rel=\"nofollow\"\u003epg_freespacemap\u003c/a\u003e module can be used to examine the information stored in free space maps.\u003c/p\u003e\n\u003c/div\u003e","SourceRevision":"555610c24d53e4316da5b7d3fc25c279d96856d5e0e23ee308c328c5fa881d9f","ContentHash":"737a8fc4d96359e9dda36710e7b99d65d9b363307bd3837e48447cb429c5b40b","Payload":{"description":["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, the FSM is stored in a file called 12345_fsm , in the same directory as the main relation file."],"manual_html":"\u003cdiv class=\"sect1\"\u003e\n\u003cdiv class=\"titlepage\"\u003e\n\u003cdiv\u003e\n\u003cdiv\u003e\n\u003ch2 class=\"title\"\u003e66.3. Free Space Map \u003c/h2\u003e\n\u003c/div\u003e\n\u003c/div\u003e\n\u003c/div\u003e\n\u003cp\u003eEach 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 \u003ccode class=\"literal\"\u003e_fsm\u003c/code\u003e suffix. For example, if the filenode of a relation is 12345, the FSM is stored in a file called \u003ccode class=\"filename\"\u003e12345_fsm\u003c/code\u003e, in the same directory as the main relation file.\u003c/p\u003e\n\u003cp\u003eThe Free Space Map is organized as a tree of FSM pages. The bottom level FSM 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.\u003c/p\u003e\n\u003cp\u003eWithin each FSM page is a binary tree, stored in an array with one byte per node. Each leaf node represents a heap page, or a lower level FSM 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.\u003c/p\u003e\n\u003cp\u003eSee \u003ccode class=\"filename\"\u003esrc/backend/storage/freespace/README\u003c/code\u003e for more details on how the FSM is structured, and how it's updated and searched. The \u003ca class=\"xref\" href=\"/docs/18/pgfreespacemap.html\" title=\"F.27. pg_freespacemap — examine the free space map\"\u003epg_freespacemap\u003c/a\u003e module can be used to examine the information stored in free space maps.\u003c/p\u003e\n\u003c/div\u003e","related":[{"label":"Table AM","url":"/wiki/tableam/?v=18"},{"label":"Storage Parameters","url":"/wiki/relopts/?v=18"}],"sections":[],"tables":[]}},"RequestedLocale":"zh-Hans","Fallback":true,"Versions":["10","11","12","13","14","15","16","17","18","19","20"],"Locales":["en"],"Signatures":null,"Spellings":null,"SQLState":null,"Evidence":null}
