summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Paquier2025-03-27 01:20:45 +0000
committerMichael Paquier2025-03-27 01:20:45 +0000
commit2afdb9dd96fb01fa22a11275c0bd47db14d05998 (patch)
treebbfe94e6544b87c6cef076c91b7ae49f5ff28680
parentcb0ad70b8e47a2beb199b2106fb652f6a287aade (diff)
doc: Correct description of values used in FSM for indexes
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/[email protected] Backpatch-through: 13
-rw-r--r--doc/src/sgml/pgfreespacemap.sgml2
-rw-r--r--src/backend/storage/freespace/indexfsm.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/doc/src/sgml/pgfreespacemap.sgml b/doc/src/sgml/pgfreespacemap.sgml
index 829ad60f32f..3774a9f8c6b 100644
--- a/doc/src/sgml/pgfreespacemap.sgml
+++ b/doc/src/sgml/pgfreespacemap.sgml
@@ -67,7 +67,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>
diff --git a/src/backend/storage/freespace/indexfsm.c b/src/backend/storage/freespace/indexfsm.c
index 35fb41ea7d6..ea0557801c1 100644
--- a/src/backend/storage/freespace/indexfsm.c
+++ b/src/backend/storage/freespace/indexfsm.c
@@ -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.
*
*-------------------------------------------------------------------------
*/