バージョンごとのドキュメント一覧

73.3. 空き領域マップ #

<title>Free Space Map</title>

Each heap and index relation, except for hash indexes, has a Free Space Map (<acronym>FSM</acronym>) 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 <literal>_fsm</literal> suffix. For example, if the filenode of a relation is 12345, the <acronym>FSM</acronym> is stored in a file called <filename>12345_fsm</filename>, in the same directory as the main relation file. ヒープとハッシュインデックス以外のインデックスリレーションはそれぞれ、そのリレーション内で利用可能な領域を継続して追跡するために、空き領域マップ(FSM)を持ちます。 これは、個々のリレーションのフォーク内の主リレーションデータに沿って、リレーションのファイルノード番号に_fsmという接尾辞を付けた名前のファイルに格納されます。 例えばリレーションのファイルノードが12345であれば、FSMは主リレーションファイルと同じディレクトリ内の12345_fsmという名前のファイルに格納されます。

The Free Space Map is organized as a tree of <acronym>FSM</acronym> pages. The bottom level <acronym>FSM</acronym> 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. 空き領域マップはFSMページのツリーとして編成されます。 最下位レベルのFSMページはすべてのヒープ(またはインデックス)ページで利用可能な空き領域を、各ページ毎に1バイト使用して格納します。 上位レベルは下位レベルからの情報を集約します。

Within each <acronym>FSM</acronym> 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 <acronym>FSM</acronym> 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. FSMページの内部はノード当たり1バイトを持つ配列内に格納されたバイナリツリーです。 各リーフノードはヒープページ、または下位レベルのFSMページを表現します。 各非リーフノード内には、子の値より大きな値が格納されます。 したがってリーフノード内の最大値がルートに格納されます。

See <filename>src/backend/storage/freespace/README</filename> for more details on how the <acronym>FSM</acronym> is structured, and how it's updated and searched. The <xref linkend="pgfreespacemap"/> module can be used to examine the information stored in free space maps. FSMがどのように構築されるか、そしてどのように更新、検索されるかに関する詳細はsrc/backend/storage/freespace/READMEを参照してください。 pg_freespacemapモジュールを使用して、空き領域マップに格納された情報を調べることができます。