diff --git a/doc/src/sgml/brin.sgml b/doc/src/sgml/brin.sgml index 2202b7a099..0883b9a0ef 100644 --- a/doc/src/sgml/brin.sgml +++ b/doc/src/sgml/brin.sgml @@ -58,6 +58,26 @@ 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. + + diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml index d230c6073d..8ef9fcedfc 100644 --- a/doc/src/sgml/func.sgml +++ b/doc/src/sgml/func.sgml @@ -17912,6 +17912,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