Document brin_summarize_new_pages
authorAlvaro Herrera
Mon, 28 Dec 2015 18:28:19 +0000 (15:28 -0300)
committerAlvaro Herrera
Mon, 28 Dec 2015 18:28:19 +0000 (15:28 -0300)
Pointer out by Jeff Janes

doc/src/sgml/brin.sgml
doc/src/sgml/func.sgml

index 2202b7a09961e472105517ab2a6dfbeba5c89ff8..0883b9a0efcc23bd02f902cc3a1694ef87a9fabf 100644 (file)
   store more index entries), but at the same time the summary data stored can
   be more precise and more data blocks can be skipped during an index scan.
  
+
+  Index Maintenance
+
+  
+   At the time of creation, all existing index pages are scanned and a
+   summary index tuple is created for each range, including the
+   possibly-incomplete range at the end.
+   As new pages are filled with data, page ranges that are already
+   summarized will cause the summary information to be updated with data
+   from the new tuples.
+   When a new page is created that does not fall within the last
+   summarized range, that range does not automatically acquire a summary
+   tuple; those tuples remain unsummarized until a summarization run is
+   invoked later, creating initial summaries.
+   This process can be invoked manually using the
+   brin_summarize_new_pages(regclass) function,
+   or automatically when VACUUM processes the table.
+  
 
 
 
index 6b3e5adfc7624d8ec53b9a6b53d158bf978a6b55..da59c0763766fdb61f43a74e4459be5eee6bb97c 100644 (file)
@@ -17871,6 +17871,48 @@ postgres=# SELECT * FROM pg_xlogfile_name_offset(pg_stop_backup());
 
   
 
+  
+   Index Maintenance Functions
+
+   
+    brin_summarize_new_values
+   
+
+   
+     shows the functions
+    available for index maintenance tasks.
+   
+
+   
+    Index Maintenance Functions
+    
+     
+      Name Return Type Description
+     
+
+     
+      
+       
+        brin_summarize_new_values(index_oid regclass)
+       
+       integer
+       summarize page ranges not already summarized
+      
+     
+    
+   
+
+   
+    brin_summarize_new_values receives a BRIN index OID as
+    argument and inspects the index to find page ranges in the base table
+    that are not currently summarized by the index; for any such range
+    it creates a new summary index tuple by scanning the table pages.
+    It returns the number of new page range summaries that were inserted
+    into the index.
+   
+
+  
+
   
    Generic File Access Functions