[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["很难理解","hardToUnderstand","thumb-down"],["信息或示例代码不正确","incorrectInformationOrSampleCode","thumb-down"],["没有我需要的信息/示例","missingTheInformationSamplesINeed","thumb-down"],["翻译问题","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-08-21。"],[[["\u003cp\u003eAlloyDB Omni supports adaptive autovacuum, which automates vacuuming and table statistics updates, adapting to workload changes.\u003c/p\u003e\n"],["\u003cp\u003eAdaptive autovacuum automatically adjusts resources like CPU, I/O, and memory, optimizing the vacuum process without impacting system performance.\u003c/p\u003e\n"],["\u003cp\u003eThis feature prevents transaction ID wraparound by monitoring vacuum progress and transaction ID consumption, triggering full database vacuuming when needed.\u003c/p\u003e\n"],["\u003cp\u003eAlloyDB Omni's adaptive autovacuum performs timely dead tuple removal, preventing table and index bloat.\u003c/p\u003e\n"],["\u003cp\u003eWhile adaptive autovacuum works automatically, it can be disabled or further configured using standard PostgreSQL vacuum and autovacuum database flags.\u003c/p\u003e\n"]]],[],null,["# Configure adaptive autovacuum\n\nSelect a documentation version: Current (16.8.0)keyboard_arrow_down\n\n- [Current (16.8.0)](/alloydb/omni/current/docs/adaptive-autovacuum)\n- [16.8.0](/alloydb/omni/16.8.0/docs/adaptive-autovacuum)\n- [16.3.0](/alloydb/omni/16.3.0/docs/adaptive-autovacuum)\n- [15.12.0](/alloydb/omni/15.12.0/docs/adaptive-autovacuum)\n- [15.7.1](/alloydb/omni/15.7.1/docs/adaptive-autovacuum)\n- [15.7.0](/alloydb/omni/15.7.0/docs/adaptive-autovacuum)\n\n\u003cbr /\u003e\n\nThis page provides an overview of AlloyDB Omni adaptive autovacuum and describes how to configure it.\n\n\u003cbr /\u003e\n\nVacuuming is an important PostgreSQL database maintenance operation. It is used to\nreclaim storage space occupied by updated or deleted rows to avoid table or index\nbloat. It is also used for freezing transaction IDs to [prevent transaction ID wraparound](https://www.postgresql.org/docs/current/routine-vacuuming.html#VACUUM-FOR-WRAPAROUND) and for updating the table statistics.\n\nFor more information about vacuuming, see [Routine vacuuming](https://www.postgresql.org/docs/current/routine-vacuuming.html).\n\nTo automate the process of vacuuming and collectively updating the table statistics,\nAlloyDB Omni supports adaptive autovacuum. *Adaptive autovacuum* enables\nautomatic adjustment of vacuum workload when your workload changes, removes dead\ntuples, and updates table statistics.\n\nAutovacuum ensures a reliable and consistent application transactional performance\nand maintains high availability of the system by preventing transaction ID wraparound.\n\nBy default, AlloyDB Omni enables adaptive autovacuum. You can disable\nor modify adaptive autovacuum on AlloyDB Omni by [using database flags](#view-cluster).\n\nBenefits\n--------\n\nAdaptive autovacuum offers the following benefits:\n\n- **Automatic adjustment of resources.** AlloyDB Omni automatically adjusts\n resources such as CPU, I/O, number of vacuum processes, and memory for the vacuum\n process based on the real time status of the workload and available resources\n without affecting the system performance.\n\n- **Prevention of transaction ID wraparound.** AlloyDB Omni monitors the\n vacuum progress and transaction ID consumption speed. When necessary,\n AlloyDB Omni throttles its transaction ID consumption by\n vacuuming every table in the database, preventing transaction ID wraparound.\n\n- **Periodic vacuum for tables.** AlloyDB Omni triggers autovacuum\n based on the number of dead tuples and the pages that need to be\n scanned. It removes dead tuples in a timely manner to avoid table or index bloat.\n\n- **Automatic detection of blockers.** AlloyDB Omni automatically detects\n blockers such as long running transactions, orphan prepared transactions, orphan\n replication slots, and shows warning messages similar to the following in the\n `postgres` log:\n\n Found a backend process PROCESS_ID with a long running transaction whose transaction\n id age AGE is larger than or equal to the transaction age threshold AGE_THRESHOLD.\n\nConfigure adaptive autovacuum\n-----------------------------\n\nBy default, adaptive autovacuum is enabled on AlloyDB Omni. You can\ndisable adaptive autovacuum by setting an instance's `enable_google_adaptive_autovacuum`\ndatabase flag to `off`.\n\nAlloyDB Omni supports several standard PostgreSQL database flags related\nto vacuum and autovacuum, for example, `vacuum_cost_delay` and `autovacuum_vacuum_cost_delay`.\nYou don't need to set values in any of these flags for adaptive autovacuum to work\nbecause adaptive autovacuum adapts and optimizes its behavior to your real workloads.\nIf you set values in these flags, then adaptive autovacuum adjusts its behavior\nto take your preferences into account.\n\nTo see the complete list of supported PostgreSQL database flags related to vacuum\nand autovacuum, see [vacuum flags](https://www.postgresql.org/docs/current/runtime-config-resource.html#GUC-VACUUM-COST-DELAY)\nand [autovacuum flags](https://www.postgresql.org/docs/current/runtime-config-autovacuum.html)."]]