Skip to content

Commit b209856

Browse files
committed
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 <alexf01@gmail.com> Discussion: https://postgr.es/m/71eef655-c192-453f-ac45-2772fec2cb04@gmail.com Backpatch-through: 13
1 parent 6be02bb commit b209856

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

doc/src/sgml/pgfreespacemap.sgml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
<para>
6767
For indexes, what is tracked is entirely-unused pages, rather than free
6868
space within pages. Therefore, the values are not meaningful, just
69-
whether a page is full or empty.
69+
whether a page is in-use or empty.
7070
</para>
7171
</sect2>
7272

src/backend/storage/freespace/indexfsm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
* This is similar to the FSM used for heap, in freespace.c, but instead
1717
* of tracking the amount of free space on pages, we only track whether
1818
* pages are completely free or in-use. We use the same FSM implementation
19-
* as for heaps, using BLCKSZ - 1 to denote used pages, and 0 for unused.
19+
* as for heaps, using 0 to denote used pages, and (BLCKSZ - 1) for unused.
2020
*
2121
*-------------------------------------------------------------------------
2222
*/

0 commit comments

Comments
 (0)