{"Entry":{"collection":"relopts","key":"toast-vacuum-index-cleanup","name":"toast.vacuum_index_cleanup","aliases":["vacuum_index_cleanup"],"metadata":{"aliases":["vacuum_index_cleanup"],"category":"TOAST tables","content_hash":"3e8a0f4bb2e0ff076c0f2fbe47a1332b1b7ac5fec8ca25f3a3107fd705672a32","derived_content_hash":"26ece3eaf25a92a518ad25b41ef558178e5163f44ec1beeeee4f8961af74cfad","imported_at":"2026-09-30T17:44:22.399044+08:00","name":"toast.vacuum_index_cleanup","name_zh":"TOAST vacuum_index_cleanup","repair_provenance":{"original_source_revision":"","receipt_sha256":"d17c2da7c71af4fd521cc0203687a5937c28bd7a2101d44ec4d9864eceb1c5a1","repair":"wiki-repair-20261023"},"slug":"toast-vacuum-index-cleanup","source_rev":"wiki-repair-20261023:0ac4c5b100b643b70bdbfaecc012b989457627bd7e8b4f48fc5aa16049cf5b62","summary":"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."}},"Definition":{"Collection":"relopts","Key":"toast-vacuum-index-cleanup","SourceDatabase":"center","Version":"18","SourceTable":"relopt","SourceKey":"toast-vacuum-index-cleanup","SourceRevision":"eb6c2292fdf28e1b4635ab478eec3919411cdf4a6c07553387870e26201f3744","Facts":{"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."],"description_zh":"强制或禁用在该表上执行 VACUUM 时的索引清理。默认值为 AUTO。设为 OFF 时禁用索引清理，设为 ON 时启用，设为 AUTO 时，则每次运行 VACUUM 都会动态决定。动态行为允许 VACUUM 避免为了移除很少的死元组而无谓地扫描索引。强制禁用全部索引清理可以显著加快 VACUUM，但如果表修改频繁，也可能导致索引严重膨胀。若在 VACUUM 中指定了 INDEX_CLEANUP 参数，则会覆盖此选项的值。","description_zh_html":"\u003cp\u003e\n      强制或禁用在该表上执行 \u003ccode class=\"command\"\u003eVACUUM\u003c/code\u003e 时的索引清理。默认值为 \u003ccode class=\"literal\"\u003eAUTO\u003c/code\u003e。设为 \u003ccode class=\"literal\"\u003eOFF\u003c/code\u003e 时禁用索引清理，设为 \u003ccode class=\"literal\"\u003eON\u003c/code\u003e 时启用，设为 \u003ccode class=\"literal\"\u003eAUTO\u003c/code\u003e 时，则每次运行 \u003ccode class=\"command\"\u003eVACUUM\u003c/code\u003e 都会动态决定。动态行为允许\n      \u003ccode class=\"command\"\u003eVACUUM\u003c/code\u003e 避免为了移除很少的死元组而无谓地扫描索引。强制禁用全部索引清理可以显著加快 \u003ccode class=\"command\"\u003eVACUUM\u003c/code\u003e，但如果表修改频繁，也可能导致索引严重膨胀。若在\n      \u003ca class=\"link\" href=\"/zh/docs/18/sql-vacuum.html\" title=\"VACUUM\"\u003e\u003ccode class=\"command\"\u003eVACUUM\u003c/code\u003e\u003c/a\u003e 中指定了\n      \u003ccode class=\"literal\"\u003eINDEX_CLEANUP\u003c/code\u003e 参数，则会覆盖此选项的值。\n     \u003c/p\u003e","facts":[{"label":"Applies to","value":"TOAST tables"},{"label":"Value type","value":"enum"}],"related":[{"label":"Table option vacuum_index_cleanup","url":"/wiki/relopts/table-vacuum-index-cleanup/?v=18"},{"label":"CREATE TABLE","url":"/wiki/sql/create-table/?v=18"}],"release":{"channel":"stable","label":"18.6","major":"18","ref":"Local English manual 18.6","revision":"eb6c2292fdf28e1b4635ab478eec3919411cdf4a6c07553387870e26201f3744"},"sections":[{"paragraphs":["This option applies to the associated TOAST table. Set it with the toast. prefix in WITH or ALTER TABLE SET. An unset TOAST option inherits the corresponding explicitly set parent-table option.","The manual describes table and TOAST forms together. Autoanalyze does not apply to TOAST tables; only explicitly documented toast. forms are listed here."],"title":"TOAST inheritance"},{"paragraphs":["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."],"title":"Common table storage rules"},{"paragraphs":["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."],"title":"Materialized views"}],"signature":"WITH (toast.vacuum_index_cleanup = value)","sources":[{"label":"PostgreSQL 18 English manual","path":"sql-createtable.html","sha256":"b4d703391fe1102d0e02bd6769bef928513eb7a5542f38f7448fc77fe69e0d5b","url":"/docs/18/sql-createtable.html#RELOPTION-VACUUM-INDEX-CLEANUP"},{"label":"PostgreSQL 18 English manual","path":"sql-creatematerializedview.html","sha256":"bd8a6710c9f133afee191eb0ec345ef8c54bb54db2242621d8cb683c783a8b18","url":"/docs/18/sql-creatematerializedview.html"}],"translation_provenance":{"inputs":[{"kind":"current-pgdoc-translation","path":"/Users/vonng/pgsty/pgdoc/zh/18/html/sql-createtable.html","sha256":"c044586c69b191e0f39966b25811a0c70f12fe2bf5e7f640501e53d76ca8f775"}],"kind":"same-version-pgdoc","locale":"zh-Hans","source_revision":"b1b500221dbe5437cfca004d6b04d3f6e422765d","version":"18"},"zh_from":"same-version-pgdoc"},"ManualEvidence":{"release":{"channel":"stable","label":"18.6","major":"18","ref":"Local English manual 18.6","revision":"eb6c2292fdf28e1b4635ab478eec3919411cdf4a6c07553387870e26201f3744"},"sources":[{"label":"PostgreSQL 18 English manual","path":"sql-createtable.html","sha256":"b4d703391fe1102d0e02bd6769bef928513eb7a5542f38f7448fc77fe69e0d5b","url":"/docs/18/sql-createtable.html#RELOPTION-VACUUM-INDEX-CLEANUP"},{"label":"PostgreSQL 18 English manual","path":"sql-creatematerializedview.html","sha256":"bd8a6710c9f133afee191eb0ec345ef8c54bb54db2242621d8cb683c783a8b18","url":"/docs/18/sql-creatematerializedview.html"}]},"MeasuredEvidence":{}},"Text":{"Collection":"relopts","Key":"toast-vacuum-index-cleanup","SourceDatabase":"center","Version":"18","Locale":"en","Title":"toast.vacuum_index_cleanup","Summary":"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.","BodyHTML":"\u003cp\u003eForces 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.\u003c/p\u003e","SourceRevision":"eb6c2292fdf28e1b4635ab478eec3919411cdf4a6c07553387870e26201f3744","ContentHash":"39386d13a08237d2a9ee985c31f2a1c5b164825c4219f4aded369438333594a8","Payload":{"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."],"related":[{"label":"Table option vacuum_index_cleanup","url":"/wiki/relopts/table-vacuum-index-cleanup/?v=18"},{"label":"CREATE TABLE","url":"/wiki/sql/create-table/?v=18"}],"sections":[{"paragraphs":["This option applies to the associated TOAST table. Set it with the toast. prefix in WITH or ALTER TABLE SET. An unset TOAST option inherits the corresponding explicitly set parent-table option.","The manual describes table and TOAST forms together. Autoanalyze does not apply to TOAST tables; only explicitly documented toast. forms are listed here."],"title":"TOAST inheritance"},{"paragraphs":["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."],"title":"Common table storage rules"},{"paragraphs":["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."],"title":"Materialized views"}]}},"RequestedLocale":"en","Fallback":false,"Versions":["12","13","14","15","16","17","18","19","20"],"Locales":["en","zh-Hans"],"Signatures":null,"Spellings":null,"SQLState":null,"Evidence":null}
