RefLib

Reference library for AI

Back

postgresql_16:3.6.27.8 Index Maintenance Functions

PostgreSQL 16 > The SQL Language > Functions and Operators > System Administration Functions > Index Maintenance Functions

(see functions-admin-index-table) shows the functions available for index maintenance tasks. (Note that these maintenance tasks are normally done automatically by autovacuum; use of these functions is only required in special cases.) These functions cannot be executed during recovery. Use of these functions is restricted to superusers and the owner of the given index.

| Function Description | | --- | | brin_summarize_new_values ( index regclass ) integer Scans the specified BRIN 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 those table pages. Returns the number of new page range summaries that were inserted into the index. | | brin_summarize_range ( index regclass, blockNumber bigint ) integer Summarizes the page range covering the given block, if not already summarized. This is like brin_summarize_new_values except that it only processes the page range that covers the given table block number. | | brin_desummarize_range ( index regclass, blockNumber bigint ) void Removes the BRIN index tuple that summarizes the page range covering the given table block, if there is one. | | gin_clean_pending_list ( index regclass ) bigint Cleans up the “pending” list of the specified GIN index by moving entries in it, in bulk, to the main GIN data structure. Returns the number of pages removed from the pending list. If the argument is a GIN index built with the fastupdate option disabled, no cleanup happens and the result is zero, because the index doesn't have a pending list. See (see postgresql_16:8.19.4.1) and (see postgresql_16:8.19.5) for details about the pending list and fastupdate option. |

Back