↑↓ select ↵ open ⌫ change scope Open full search

PG.CENTER connects PostgreSQL documentation, reference, and ecosystem knowledge. Maintained by Pigsty.

Documentation / Storage Parameters / Tables and materialized views

vacuum_index_cleanup

vacuum_index_cleanup

Forces or disables index cleanup when VACUUM is run on this table. The default value is AUTO . With OFF , index cleanup is disabled, with ON it is enabled, and with AUTO a decision is made dynamically, each time VACUUM runs. The dynamic behavior allows VACUUM to avoid needlessly scanning indexes to remove very few dead tuples. Forcibly disabling all index cleanup can speed up VACUUM very significantly, but may also lead to severely bloated indexes if table modifications are frequent. The INDEX_CLEANUP parameter of VACUUM , if specified, overrides the value of this option.

Reading PostgreSQL 18.6.

Description

Forces or disables index cleanup when VACUUM is run on this table. The default value is AUTO . With OFF , index cleanup is disabled, with ON it is enabled, and with AUTO a decision is made dynamically, each time VACUUM runs. The dynamic behavior allows VACUUM to avoid needlessly scanning indexes to remove very few dead tuples. Forcibly disabling all index cleanup can speed up VACUUM very significantly, but may also lead to severely bloated indexes if table modifications are frequent. The INDEX_CLEANUP parameter of VACUUM , if specified, overrides the value of this option.

Applies to
Tables and materialized views
Value type
enum

Usage

WITH (vacuum_index_cleanup = value)

Scope

This relation-level setting applies to the table or materialized view. Any corresponding global parameter has a separate entry.

Common table storage rules

The WITH clause can specify storage parameters for tables, and for indexes associated with a UNIQUE , PRIMARY KEY , or EXCLUDE constraint. Storage parameters for indexes are documented in CREATE INDEX . The storage parameters currently available for tables are listed below. For many of these parameters, as shown, there is an additional parameter with the same name prefixed with toast. , which controls the behavior of the table's secondary TOAST table, if any (see Section 66.2 for more information about TOAST). If a table parameter value is set and the equivalent toast. parameter is not, the TOAST table will use the table's parameter value. Specifying these parameters for partitioned tables is not supported, but you may specify them for individual leaf partitions.

Materialized views

This clause specifies optional storage parameters for the new materialized view; see Storage Parameters in the CREATE TABLE documentation for more information. All parameters supported for CREATE TABLE are also supported for CREATE MATERIALIZED VIEW . See CREATE TABLE for more information.

Related entries

Documentation and source

Source build
Version
18.6
Build
Local English manual 18.6
Source fingerprint
eb6c2292fdf28e1b4635ab478eec3919411cdf4a6c07553387870e26201f3744

Related entries

Back to Storage Parameters · Recorded in PostgreSQL 12 through 20; the first sample is not necessarily its introduction.