doc: Correct description of values used in FSM for indexes
authorMichael Paquier <[email protected]>
Thu, 27 Mar 2025 01:20:49 +0000 (10:20 +0900)
committerMichael Paquier <[email protected]>
Thu, 27 Mar 2025 01:20:49 +0000 (10:20 +0900)
The implementation of FSM for indexes is simpler than heap, where 0 is
used to track if a page is in-use and (BLCKSZ - 1) if a page is free.
One comment in indexfsm.c and one description in the documentation of
pg_freespacemap were incorrect about that.

Author: Alex Friedman <[email protected]>
Discussion: https://postgr.es/m/71eef655-c192-453f-ac45-2772fec2cb04@gmail.com
Backpatch-through: 13

doc/src/sgml/pgfreespacemap.sgml
src/backend/storage/freespace/indexfsm.c

index 5025498249d87267101643b26d3a1ecbb75603f6..0dbbbdd8a6f0bd8291228b977879feac9184b5f6 100644 (file)
@@ -66,7 +66,7 @@
   <para>
    For indexes, what is tracked is entirely-unused pages, rather than free
    space within pages.  Therefore, the values are not meaningful, just
-   whether a page is full or empty.
+   whether a page is in-use or empty.
   </para>
  </sect2>
 
index d66e10b89d292051e9176b4a4b7fe11a21d9d311..4a2087d415c70ec4fa93debd9b8ae68a420bc79f 100644 (file)
@@ -16,7 +16,7 @@
  * This is similar to the FSM used for heap, in freespace.c, but instead
  * of tracking the amount of free space on pages, we only track whether
  * pages are completely free or in-use. We use the same FSM implementation
- * as for heaps, using BLCKSZ - 1 to denote used pages, and 0 for unused.
+ * as for heaps, using 0 to denote used pages, and (BLCKSZ - 1) for unused.
  *
  *-------------------------------------------------------------------------
  */