Improve documentation of pageinspect
authorMichael Paquier
Fri, 23 Aug 2019 11:41:13 +0000 (20:41 +0900)
committerMichael Paquier
Fri, 23 Aug 2019 11:41:13 +0000 (20:41 +0900)
This adds a section for heap-related functions.  These were previously
mixed with functions having a more general purpose, leading to
confusion.  While on it, add a query example for fsm_page_contents.

Backpatch down to 10, where b5e3942 introduced the subsections for
function types in pageinspect documentation.

Author: Masahiko Sawada
Discussion: https://postgr.es/m/CAD21AoDyM7E1+cK3-aWejxKTGC-wVVP2B+RnJhN6inXyeRmqzw@mail.gmail.com
Backpatch-through: 10

doc/src/sgml/pageinspect.sgml

index 8d81f8894e72acf652e9b26cee03a08400e08155..cb08c7632b9fd926ac42496e045d8b44b6c9faae 100644 (file)
@@ -125,6 +125,39 @@ test=# SELECT page_checksum(get_raw_page('pg_class', 0), 0);
     
    
 
+   
+    
+     fsm_page_contents(page bytea) returns text
+     
+      fsm_page_contents
+     
+    
+
+    
+     
+      fsm_page_contents shows the internal node structure
+      of a FSM page.  For example:
+
+test=# SELECT fsm_page_contents(get_raw_page('pg_class', 'fsm', 0));
+
+      The output is a multiline string, with one line per node in the binary
+      tree within the page.  Only those nodes that are not zero are printed.
+      The so-called "next" pointer, which points to the next slot to be
+      returned from the page, is also printed.
+     
+     
+      See src/backend/storage/freespace/README for more
+      information on the structure of an FSM page.
+     
+    
+   
+  
+
+  Heap Functions
+
+  
    
     
      heap_page_items(page bytea) returns setof record
@@ -203,29 +236,6 @@ test=# SELECT * FROM heap_page_item_attrs(get_raw_page('pg_class', 0), 'pg_class
      
     
    
-
-   
-    
-     fsm_page_contents(page bytea) returns text
-     
-      fsm_page_contents
-     
-    
-
-    
-     
-      fsm_page_contents shows the internal node structure
-      of a FSM page. The output is a multiline string, with one line per
-      node in the binary tree within the page. Only those nodes that are not
-      zero are printed. The so-called "next" pointer, which points to the
-      next slot to be returned from the page, is also printed.
-     
-     
-      See src/backend/storage/freespace/README for more
-      information on the structure of an FSM page.
-     
-    
-