{"Entry":{"collection":"guc","key":"autovacuum_max_workers","name":"autovacuum_max_workers","aliases":[],"metadata":{"baseline":false,"boot_human":"Not specified","boot_val":null,"category":"Vacuuming / Automatic Vacuuming","category_zh":"","changed_in":["9.1","9.6","18"],"changes":[{"documentation_changed":false,"fields":{},"from":"8.2","status":"added","to":"8.3"},{"documentation_changed":true,"fields":{},"from":"8.4","status":"changed","to":"9.0"},{"documentation_changed":false,"fields":{"max_val":{"from":"536870911","to":"8388607"}},"from":"9.0","status":"changed","to":"9.1"},{"documentation_changed":true,"fields":{},"from":"9.4","status":"changed","to":"9.5"},{"documentation_changed":false,"fields":{"max_val":{"from":"8388607","to":"262143"}},"from":"9.5","status":"changed","to":"9.6"},{"documentation_changed":true,"fields":{"category":{"from":"Autovacuum","to":"Vacuuming / Automatic Vacuuming"},"context":{"from":"postmaster","to":"sighup"}},"from":"17","status":"changed","to":"18"}],"content_hash":"c6e753393f93525972f1eccacefaa27176c3951ffb853b075b8dcd920e1cba2e","context":"","default_changed_in":[],"default_history":[{"from":"9.0","to":"19","value":"3"}],"editorial":{"advice":{"olap":"Large relations can occupy workers for long periods, so extra workers may reduce backlog across databases. Pair any increase with explicit maintenance windows and cost-limit review.","oltp":"Increase gradually only when eligible tables wait too long and storage has headroom. Check worker saturation, vacuum duration, I/O latency, and autovacuum_worker_slots together.","small":"Two or three workers are usually a sensible starting range. Prefer fewer concurrent workers over disabling autovacuum on a constrained host."},"mechanism":["The launcher starts workers across databases up to this limit. A worker can process one table at a time, several workers may operate in the same database, and these processes do not consume max_connections slots.","In PostgreSQL 18, autovacuum workers are drawn from autovacuum_worker_slots, so setting this value above the slot count has no effect. The local fact matrix also records a context change: PG10-17 required server start, while PG18 makes the setting reloadable.","Autovacuum cost limits are normally balanced among active workers. Raising only the worker count therefore improves concurrency and queueing, but does not necessarily multiply the total permitted maintenance I/O rate."],"pitfalls":["A value above autovacuum_worker_slots is ineffective on PostgreSQL 18.","More workers can amplify I/O latency even when backlog improves.","Raising workers alone may not raise aggregate cost-based vacuum throughput.","A few very large tables can occupy all workers and delay unrelated databases.","Changing it on PG10-17 requires restart; PG18 behavior is reloadable."],"references":[{"title":"PostgreSQL 19 Beta 4: autovacuum_max_workers","url":"https://www.postgresql.org/docs/19/runtime-config-vacuum.html#GUC-AUTOVACUUM-MAX-WORKERS"},{"title":"PostgreSQL 18: The Autovacuum Daemon","url":"https://www.postgresql.org/docs/18/routine-vacuuming.html#AUTOVACUUM"},{"title":"PostgreSQL 19 release notes","url":"https://www.postgresql.org/docs/19/release-19.html"}],"related":["autovacuum","autovacuum_worker_slots","autovacuum_naptime","autovacuum_vacuum_cost_limit","autovacuum_vacuum_cost_delay","max_worker_processes"],"summary":"Sets the cluster-wide ceiling for concurrently running autovacuum workers, excluding the launcher. More workers improve scheduling capacity, but they also increase concurrent maintenance demand."},"enumvals":[],"first_version":"8.3","group":"Vacuuming","group_slug":"vacuum","imported_at":"2026-09-27T17:57:30.802791+08:00","intro_commit":{},"key":"autovacuum_max_workers","last_version":"20","max_val":"","min_val":"","name":"autovacuum_max_workers","position":23,"present_in":["8.3","8.4","9.0","9.1","9.2","9.3","9.4","9.5","9.6","10","11","12","13","14","15","16","17","18","19","20"],"short_desc":"Specifies the maximum number of autovacuum processes (other than the autovacuum launcher) that may be running at any one time.","short_desc_zh":"","source_rev":"english-manuals:b3451c8dc68eafe4dfd6af223d6d3361102267a720cbd9fc83b03478d221857b","unit":"","vartype":"integer"}},"Definition":{"Collection":"guc","Key":"autovacuum_max_workers","SourceDatabase":"center","Version":"18","SourceTable":"guc","SourceKey":"autovacuum_max_workers","SourceRevision":"english-manuals:b3451c8dc68eafe4dfd6af223d6d3361102267a720cbd9fc83b03478d221857b","Facts":{"boot_val":"3","category":"Vacuuming / Automatic Vacuuming","context":"sighup","description":"Specifies the maximum number of autovacuum processes (other than the autovacuum launcher) that may be running at any one time. The default is 3. This parameter can only be set in the postgresql.conf file or on the server command line. Note that a setting for this value which is higher than autovacuum_worker_slots will have no effect, since autovacuum workers are taken from the pool of slots established by that setting.","doc":{"anchor":"GUC-AUTOVACUUM-MAX-WORKERS","file":"runtime-config-vacuum.html","lang":"en","sha256":"7047f1fa9138b97f1812532f8a905fa7479451dfd64655e029a7d387b20b22e4","slug":"18"},"documented":true,"enumvals":null,"extra_desc":null,"lang":"en","max_val":"262143","metadata_version":"18","min_val":"1","name":"autovacuum_max_workers","short_desc":"Sets the maximum number of simultaneously running autovacuum worker processes.","source":"pg-settings-source-snapshot","unit":null,"vartype":"integer"},"ManualEvidence":{"doc":{"anchor":"GUC-AUTOVACUUM-MAX-WORKERS","file":"runtime-config-vacuum.html","lang":"en","sha256":"7047f1fa9138b97f1812532f8a905fa7479451dfd64655e029a7d387b20b22e4","slug":"18"}},"MeasuredEvidence":{"metadata_version":"18"}},"Text":{"Collection":"guc","Key":"autovacuum_max_workers","SourceDatabase":"pgweb","Version":"18","Locale":"zh-Hans","Title":"autovacuum_max_workers","Summary":"","BodyHTML":"\u003cp\u003e指定能同时运行的自动清理进程（除了自动清理启动器之外）的最大数量。默认值为\u003ccode\u003e3\u003c/code\u003e。该参数只能在\u003ccode\u003epostgresql.conf\u003c/code\u003e文件或服务器命令行中设置。\u003c/p\u003e\u003cp\u003e请注意，如果该值被设置得高于\u003ca href=\"/docs/18/runtime-config-vacuum.html#GUC-AUTOVACUUM-WORKER-SLOTS\" rel=\"nofollow\"\u003eautovacuum_worker_slots\u003c/a\u003e，将不会产生任何效果，因为自动清理工作进程是从该设置建立的槽位池中获取的。\u003c/p\u003e","SourceRevision":"2026-09-11@29c86d9","ContentHash":"96935fae1c27d25395b8cbac54750fe2a341d178ec9155bca37820df75fc6c3c","Payload":{"carried_from":"","carry_reason":"","doc_html":"\u003cp\u003e指定能同时运行的自动清理进程（除了自动清理启动器之外）的最大数量。默认值为\u003ccode class=\"literal\"\u003e3\u003c/code\u003e。该参数只能在\u003ccode class=\"filename\"\u003epostgresql.conf\u003c/code\u003e文件或服务器命令行中设置。\u003c/p\u003e\u003cp\u003e请注意，如果该值被设置得高于\u003ca href=\"/docs/18/runtime-config-vacuum.html#GUC-AUTOVACUUM-WORKER-SLOTS\"\u003eautovacuum_worker_slots\u003c/a\u003e，将不会产生任何效果，因为自动清理工作进程是从该设置建立的槽位池中获取的。\u003c/p\u003e","doc_same_as":""}},"RequestedLocale":"zh-Hans","Fallback":false,"Versions":["10","11","12","13","14","15","16","17","18","19","20","8.3","8.4","9.0","9.1","9.2","9.3","9.4","9.5","9.6"],"Locales":["en","zh-Hans"],"Signatures":null,"Spellings":null,"SQLState":null,"Evidence":null}
